Web 420 Week 3 Assignment:
1. Create an HTML page that allows the user to enter the following text fields: Name, Address, City, State(1 point)
2. Create a pulldown menu for credit card type selection (2 is sufficient, Visa and Master Card) (1 point)
3. Create a text field for credit card expiration. Have the user enter in a date. (i.e. 2006) (1 point)
4. Create a submit button. (1 point)
5. When the user hits the submit button, verify in JavaScript the following (5 points):
- Name, Address, City, State had entries. If they don't, display an alert box telling the user to enter data into the fields. Here is an Alert box example
- For the CC Expiration:
If the user enters in 2005 or earlier, display a messsage stating the Credit Card is expired.
If the user enters 2006 or later, print a message stating the credit card was accepted.
If the user enters letters instead of numbers, display an error message.
6. Add a cookie to the user's computer after the user has hit the submit button. If the same user visits your site again, add a "Welcome Back type" message in a pop up. (6 points)
Here is a hint in how to do this:
http://www.w3schools.com/js/tryit.asp?filename=tryjs_cookie_username
http://www.mach5.com/support/analyzer/manual/html/General/CookiesJavaScript.htm
6. In the Assignments-write-only area, post a link to your file. (i.e. www.geocities.com/JoeSmith/week3.html)
When loaded into a browser, it should look something like this: