Previous Example-|-Next Example-|-Return to Chapter Listing

Example 12.4:
onload: Asking the User Where to Go


In the previous page we used the onload event handler to run the confirmEntry() function which displayed the Confirm dialog box.

You arrived at this page by clicking on the OK button, and the script forwarded you here.


This is the script we used in the previous page to forward you here: <SCRIPT LANGUAGE="JavaScript"> <!-- function confirmEntry() { if (confirm("As you have a JavaScript browser, you can go to our JavaScript enabled site. Click on OK to do so, or click on Cancel to remain at this (non-JavaScript) page.")) { location='12-4a.htm' } } //--> </SCRIPT> </HEAD> <BODY onload="confirmEntry()">
Previous Example-|-Next Example-|-Return to Chapter Listing