Posted by Martin Webb on July 22, 1998 at 15:31:36:
In Reply to: onUnload () posted by Ed W on July 22, 1998 at 09:25:40:
: How exactly does this work???????
Not always : (
When you change the location, either by clicking a link, pressing back, typing in a new url, choosing an entry for the browser history, then before the old page leaves it will trigger the unload event handler.
To control what happens you can specify in the body tag, and possibly frame tag, what you want to happen. For example:
<BODY onUnload="alert ('Bye')">