ca*********@rediffmail.com (abhay) writes:
I want to trap the window.close() event when the user clicks on the
close button of the browser using javascript.
Can't be done consistently across browsers.
In IE, you can use the proprietary "onbeforeunload" handler to
do something before the window is closed. You can even request
that the window is not closed, by returning a string. That string
is shown to the user, who can then decide whether to close the
window or not.
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'