On Sat, 3 Apr 2004 00:39:17 -0500, Daniel <dh****@nothing.no.spam.com>
wrote:
Is there a way to make a javascript do something when the user closes
the browser? I would like it to go another url or something.
And how do you propose to do that in a closing browser?
Once the user is closing the browser, it's too late to do anything, so
don't try. Redesign your page with that in mind.
I do not want this script to run when a user clicks on a link on the
page, only when they close the browser.
That isn't possible. You can't determine why a page unloads, just that it
does, and even that depends on the browser in question. My browser will
only fire the onunload event when you navigate to another page. Refreshing
or closing does nothing except refresh and close; no events are fired.
Mike
--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)