my project embedded js library and cant does not has class attribute in html element like button, how can I create a pop up window with a button, once the user click the close button on pop up window, then the continue the submit form, the pop up window should
be triggered in submit form js ? and the submit form js is triggered by <button type=submit/>
As far as I think,you could cancel the submit,then open the new popup window.You could check if the popup window is closed or not.Finally,you could submit the form again.
function submitform(event) {
event.preventDefault();
var myWindow = window.open("", "MsgWindow", "width=600,height=600");
myWindow.document.write("<p>This is 'MsgWindow'. I am 600px wide and 600px tall!</p>");
var timer = setInterval(function () {
if (myWindow.closed) {
clearInterval(timer);
document.forms['form1'].submit();
}
}, 1000);
}
Best regards,
Yijing Sun
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
Member
1 Points
102 Posts
pop up window contruction
Jun 18, 2020 02:17 PM|20141113|LINK
Contributor
4060 Points
1588 Posts
Re: pop up window contruction
Jun 19, 2020 03:32 AM|yij sun|LINK
Hi 20141113,
As far as I think,you could cancel the submit,then open the new popup window.You could check if the popup window is closed or not.Finally,you could submit the form again.
More details,you could refer to below codes:
Best regards,
Yijing Sun