Homework

Homework Assignment 6
Due: Friday, May 13, 2011

References for this assignment:

Many of you messed up the javascript part of Homework 4. So here's a second chance. This assignment can take the place of your lowest homework. It could be a stand alone problem, not part of your personal website that you've been working on in class. Or you could make it fit in with your site somehow, like maybe a news letter a user could sign up for. Then you could add an item to you navigation bar, like News Letter.

There are two pages to this assignment, Page 1 and Page 2.
The three images used on the two pages are: News.jpg   newsbnr1.jpg   newsbnr3.jpg.

Do not change the action given on the register form in Page 2 - leave it just as it is.

Functionality
  1. On Page 1 there is a button. When the user clicks on the button, Page 2 should be displayed.
  2. On Page 2 there is a form containing two text boxes. If the user fails to fill in either box, a warning message should appear informing the user that both boxes must be filled out. Page 2 also contains a button. When this button is pressed, Page 1 should be displayed.
Implementation
  1. Page 1 - There needs to be an onclick event handler for the button. Here's what it looks like:

    <input type="button" name="Button" value="Sign me up now!" onclick="window.location='Page2.htm'" />

  2. Page 2 - The javascript part for validating the two text boxes is very similar to what was required on the form in Homework 4. So you should be able to figure it out by just looking at the code in the solution to Homework 4.
    There needs to be an onclick event handler for the button. Here's what it looks like:

    <input type="button" name="home" value="Home" onclick="window.location='Page1.htm'" />

Update your assignment index page (call the new page Assignments6.htm):

What to submit:

 

Posted: 5-05-2011