- Subscribe to the Body.onload using function init()
<body onload="init();" >
sample page
</body> - Subscribe to the onunload event of window object
function init ( url )
{
alert("load");
window.onunload=unloadwindow;
} - Do the oprations in the event handler
function unloadwindow(e)
{
alert("unloaded window / closed");
//Perform your operations here
}
Wednesday, July 16, 2008
Catch the browser window closed event and do something.
Simple method which listen to the browser closed event by close button and performs some operations.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment