Friday, August 3, 2007

Catch Web Browser Closing/UnLoad Event

There is a way to catch browser closing event. The most elegant way to catch browsing closing event in IE and FireFox is the following script:

< html>
< head>
< title>< /title>
< /head>

< body onbeforeunload="alert('Closing');">
< /body>
< /html>

This Script works in IE 7 and in Firefox.

No comments: