Exercise Password Protection
Before you begin, go File...Save As this Wordpad document
to your Exercise Folder on your harddrive. Save as Firstname.LastName.expassword.htm.
Also save a copy of password2.htm into your exercise folder.
Now, begin your work on your harddrive copy. Comment out each line or section of code using the /* (insert comments here) and */ symbols. See p. 14 for an example.
1. Create a script that password protects users from entering password2.htm. The user must type in the user name of rholl and a password of dufous to enter the page. Incorrect user names/passwords should give the user a message that they have the wrong username/password. You can either use an alert or any other way of informing the user they have the incorrect username/password. Hint: You will need to write a function using an if statement.
2. Extra Credit Have your script accept the multiple usernames/passwords of rholl/dufous, fred/concept, rausch/vader, smitht/bbextra and robertj/876fool.
Save this html document into the Exercise Password Folder on the server.
Do a File....Save As....Firstname.Lastname.expassword.htm an extra copy of your completed document into
the Exercises Password folder on the server. Open up your exercise on the server in a browser to make sure it appears the way your want it.