COMS303 E-Commerce Scripting Languages
Cookies Lab !
Instructions:
This part of the exercise will use the AddCookie, GetCookie and DeleteCookie generic
functions that were discussed in class. You are welcome to modify or even
create your own functions that interact with a cookie. Remember, these
functions are designed to be
generic so that can be used in other javascript applications.
For this project use your copy of the Midterm-Lab project. Save a copy of your
project to a folder called Cookie-Lab. Modify the pages in this folder
according to the following instructions.
- On the index.htm page, capture the input from the user prompt and store
this name in a cookie. Call the cookie element UserName.
- Modify the index.htm page to check and see if the user name has already
been loaded into a cookie. If not, then ask the user for their name,
otherwise display the name from the cookie instead of using the prompt box.
- On each of the other pages change them so that they access the cookie and
display the name stored in the cookie on their page inside of a set of
<H2> tags.
- Add a button to the index.htm page called DELETE NAME. This button
should delete the old cookie.
- Add a button to the index.htm page called CHANGE NAME. This button
should delete the old cookie, run the prompt box and ask for a new
name. Store this new value in the cookie.
When complete post the project folder to your folder on the student server.