|
|
Q1632 How do I close a window opened by a frame when a new page loads into the creating frame?
irt.org | Knowledge Base | JavaScript | Frame | Q1632 [ previous next ] Q1632 How do I close a window opened by a frame when a new page loads into the creating frame?Normally when you need to close a poup window when the opener changes you would simply use the body tags onUnload event handler. I'm not sure if this will work in all browsers when used in a frameset tag. Instead you might want to test from the popup window that the opener window is still the same, perhaps by checking for a variable in the opener window. The following checks that the variable windowReference still exists and still references the popup window: First the frame that opens the popup window:
And the popup.htm:
|
-- div -->
|