|
-
July 29th, 2005, 02:49 PM
#1
Close All Popups
I need to close all popup windows when the user exits the main page.
With my current code when user exits the main page after opening one popup the popup closes. But if I open both calculator window and help widow popups and exit the page, the popups don't close.
Here is my code:
//CALCULATOR Window
function calcWindow() {
var autoclose = true;
win = window.open("Calculator/SciCalc.htm",null,"height=300,width=350,status=yes,toolbar=no,menubar=no,location=no")
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
win.focus();
if (autoclose) { window.onunload = function(){win.close();}}
}
//HELP Window
function helpWindow() {
var autoclose = true;
win = window.open("/Help/Phoenix_Help/!SSL!/WebHelp/Phoenix_Help.htm",null,"height=500,width=550,status=yes,toolbar=no,menubar=no,location=no")
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
win.focus();
if (autoclose) { window.onunload = function(){win.close();}}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|