Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing
Example 12.9:
onunload: Not Always So Useful
This page actually demonstrates a problem with the onunload event handler in versions of Netscape earlier than 3.0 beta 4. Don't click on the TEST button below. Instead, enter text into the text box, then click on the Back button--if you are using Netscape 3.0 beta 3 or earlier nothing happens (well, except that the previous page loads--or, just maybe, your browser will crash). Return to this page and click on the TEST button. Close the Alert box that appears, and then click on the Back button. This time the onunload event handler runs properly, and the Alert box appears again.
We started with this script:
And we've got this button, too:
Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing