Re: Captue window.close() event



jimmy wrote :
Hi all,
I want to capture the event when the browser's close button is
clicked
in an html page.
I tried using the event.ClientX and event.ClientY property in the
body unload event, and this helps to recognise whether the close
button is clicked( also differentiates whethet refresh was clicked).
The problem arises whenever i try to close the window by resizing it

How do you actually close a window by resizing it?

or by right clicking at the bottom of the page and then closing it.

What's your page url?

Can anybody tell how to capture the window.close() event??

Why do you want to "capture" the close event? What exactly are you trying to do? Can you provide explanations, description regarding your webpage goals, requirements, purposes? What close event do you really want to "capture": the webpage being unloaded or the window being closed?
In which way dealing with the closing of the window or unloading of a webpage is actually contributing to the content for the users or contributing to the experience of the users?

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages
.