Window opened ONLY when the calling window is closed...

wxdqz

New Member
Good day to all!!

I have the following function:

function AreYouSure() {
var agree=confirm("Confirm your decision.\nClick OK to open the homepage to this site.\nClick CANCEL to exit.");
if (agree) {
window.open("/DarronMason's/ProposalToAIGClaimsDepartment/Welcome/Home/1/~.htm",'',',toolbar=no,resizable=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=no');
window.close();
}
else {
window.close();
}
}

IE asks the user if he/she would like to close the window, but it still opens the other window. What I need this to do is wait until the calling page is closed (the user selects "YES") before it opens the new window. This way, if the user selects "NO" when asked by IE if they would like the page to close, the other page will not open. I want the page being called to open ONLY when the calling window is closed.

Thanks in advance for your help and your time.

~dmason165
 
Back
Top