Ok I have seen this question unanswered for over 10 years.
How to send and close a popup with the click of a button.
proposals are implemented in this way.
function saveNClose()
{
document.form.submit();
self.close();
}
this doesn't work because the submit has a redirect, and the self.close is never reached.
function closeLaterNSaveNow();
{
setTimeout("window.close()",5000);
document.form.submit();
}
same problem.. the close is never called because the script for the page is gone.
function closeNowNSubmit()
{
self.close();
document.form.submit();
}
the window closes, but nothing gets saved. server doesn't even get notified of anything..
<input class='btn btn-success' disabled='disabled' id='SubmitFinal' onclick='closeWindow()' type='submit' value='Finish'>
Well then there no validation of the data. it submits before the function is called.
Does anyone solve this? I found the same solutions as in 2002, and some are the last ones this month. I will continue to watch, but I hope someone nailed her and that someone answers here.
source
share