Assignment 13 - A Possible Answer
You actually have to hit cancel to be reading this. Here's how I did it.
In the HEAD commands, I put this:
("Are you sure you want to enter HTML Goodies?") )
alert("Then you'll stay right here");
...and the <BODY> command looks like this:
The process was actually quite simple:
- The function was created by copying and pasting the script between the <HEAD>
commands, adding the function statement, and then surrounding the entire code with two
more fancy parantheses. It makes for a lot of the litte buggers, but they're all needed.
- The command "defaultStatus='Chicken!';" was added in the else section
to get the text in the status bar.
- The function is triggered by an onLoad Event Handler in the BODY command.
- If you wanted to get fancy and have the page open in a new window, you only had to change out two
words. Exchange "parent.location" with "window.open" and you're done.