StickBoy
10-30-2002, 05:01 AM
Popup windows are annoying. However, sometimes they can be useful, for special event alerts and such.
What I would like to do is to have the popup window close itself when the user leaves the site, or even leaves the main page, if that's the only way to go.
I understand onblur, but I don't think that will work in this case. How can you tell the popup that its content is no longer valid in relation to the main window?
I don't want it on a timer, either. Just, when the main window leaves the site (or main page), the popup should close. Is it possible? How do I do it?
What I would like to do is to have the popup window close itself when the user leaves the site, or even leaves the main page, if that's the only way to go.
I understand onblur, but I don't think that will work in this case. How can you tell the popup that its content is no longer valid in relation to the main window?
I don't want it on a timer, either. Just, when the main window leaves the site (or main page), the popup should close. Is it possible? How do I do it?