msdnexpert
Feb 4th, 2001, 07:37 AM
How does one trap the OnUnload event of the window object. When I close a window I would like to trap the Unload event. I tried calling it in the BODY tag as shown below.
<BODY OnUnLoad="UnLoader">
However in this case the unload event is invoked when I click on the Refresh button of the web browser as well as when I close the browser. I would like to trap the event only when I close the browser. Any ideas.
<BODY OnUnLoad="UnLoader">
However in this case the unload event is invoked when I click on the Refresh button of the web browser as well as when I close the browser. I would like to trap the event only when I close the browser. Any ideas.