Javascript: Lesson 3
Lab Assignments:
Lab 1:
Utilize the onMouseOver event handler with a link to bring up an alert. Note that this pretty much destroys the functionality of the link--it is hard to click on a link that pops up a message every time your mouse moves over it!
Home
Lab 2:
Utilize the onMouseover event handler with a link to change the status bar.
Lab 3:
Utilize the onClick event handler to show an alert box. You can also make this link stay on the same page by using a "return false" statement after your "alert" statement. The return false will cause the link to be a "dead" one.
Email me for comments on this assignment.
Lab 4:
Utilize the onClick event handler to show a confirmation box. Send your users to a new page if they click "OK", or keep them where they are if they click "Cancel". (Bear in mind that confirm() returns either "True" or "False" [i.e. a 1 or a 0] depending upon which choice the user clicks on the box.)
Index Page
Extra Credit Assignments:
Extra Credit 1:
Utilize onClick with a link to bring up a prompt asking for a name. Can you carry this information to a new page? Try to use what you learned last week as well. There are several ways to do this, but the one that might seem to make the most sense (creating a variable on the first page and calling it from the next) isn't the way to do it...
first solution |
second solution
Extra Credit 2:
Create an HTML form that utilizes form-specific event handlers, such as onFocus or onBlur.
home | lesson 1 | lesson 2 | lesson 4 | lesson 5
© 2001 Kiner Designs