行。我已经看到这个问题超过 10 年没有答案了。
您如何在一个按钮调用中提交和关闭弹出窗口。
建议就这样运行。
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's no validation of the data. it submits before the function is called.
有人解决这个问题吗?我找到了可以追溯到 2002 年的相同解决方案,其中一些最近在本月。我会继续看,但我希望有人已经确定了,并且有人在这里回答