[Javascript] Can this be done?

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Jun 21 10:37:16 CDT 2001


>Here is an interesting question -
>
>Is there a way to have a script in a page that when the person either shuts
>the browser down or leaves for another URL that it will pop up a small 
>window with a parting message...

Not really. You can use the onUnload event handler, but it also fires when a 
user goes to another page in your site. The browser cannot see where the 
user goes.

If you use frames, you could use the onUnload in the frameset tag. Then you 
assume that when someone leaves your frameset, he leaves your site. This 
might work.

ppk
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the Javascript mailing list