On 25 Apr 2004 21:08:11 -0700, Asit <> wrote:
> How can i know when user clicks X button of the browser ?
The unload event fires when the document unloads, but a document can
unload for many things not just closing. Furthermore, some browsers don't
fire the unload event during closing, which makes it an even more
unreliable approach.
> I have to write some code when user clicks X button of browser. What is
> the event for capturing this event ?
If the user is closing their browser, it is generally too late for you to
be doing anything. What are you trying to accomplish? There might be an
alternate way.
Mike
--
Michael Winter
d (replace ".invalid" with ".uk" to reply)