Assignment #5

My assignment is to get an alert box to pop up, when the cursor rolls across a hypertext link. This pop up window is a small dialog box, with the text written above an OK button. The new method is alert() and the format is: alert('text which appears in alert box')

This is how I composed my script:

HTML file: Displayed by browser:
<body>

<A HREF="http://www.dncsite.ca" target="_blank"
onMouseOver="alert('Here is a webpage of poetry books!');">
Click Here</A>

</body>
Click Here

The script on the answer page uses the return true, but my script works the same way. I'm not seeing the use for it. The script on the answer page has the same problem which I ran into. I cannot click on THEIR link either, because a popup window butts in. So maybe I'm just jumping ahead too much. The assignment didn't say I have to be able to click on the link too. Note: I should have used the onClick event handler.

BackTable of ContentsNext