which event should i capture when the browser closes using the x button.
Unload button is also fired when we go back or foraward from a page.How to Stop that..i only want it
Apr 6th, 2008 19:21
ha mo, Jean-Bernard Valentaten, Rohit Gupta,
Basically you cannot capture that event through js, since
it's handeled by the MFC (Microsoft Foundation Classes) and
not passed to js.
But, as a matter of fact, before the brower is shut down and
removed from memory, it unloads the page, which of course
triggers the onUnload event.
So what you can do, is handle that event.
But please, please, please do not pop open a new window. Nobody
likes new windows that pop-up when they unload a page (or shut