Javascript Tip: Catch Browser Closing Event
Occasionally there is a need to catch browser closing event. The most elegant way to catch browsing closing event in IE is the following short script:
< html>
< head>
< title>< /title>
< /head>
< body onbeforeunload="alert('Closing');">
< /body>
< /html>
The solution above does work in IE 7 and in Firefox.
Wednesday, December 29, 2004 12:48 AM