|
|
Q319 How can I load a popup window when a user leaves my site?
irt.org | Knowledge Base | JavaScript | Window | Q319 [ previous next ] Q319 How can I load a popup window when a user leaves my site?It'll be difficult to do, unless you trap all foreign links out of a document so that before the link is gone to it loads a popup window. This does not however work if the user types in a url, selects a bookmark, clicks on the back button, or selects a url from the history:
The following was submitted by Jos Juffermans: You can simply use the unload event in the body tag... However, I've had my page opening a window un exit, but I got realy tired of it pretty soon. Most users don't like popups opening... Note: If you use frames, be carefull in which page to place your onunload event... This works fine on Internet Explorer, but you may have to capture the event on Netscape Navigator.
Feedback on 'Q319 How can I load a popup window when a user leaves my site?' |
-- div -->
|