Page Location Edit
405 Last sentence Reword the sentence to read "Next you will display the name=value pairs in the ProductInfo.html query string in an alert dialog box" [Rationale: the parsing of the name=value pairs doesn't come till p. 414]
406 First sentence in box Reword the sentence to read "To display the name=value pairs in the ProductInfo.html query string and display them in an alert dialog box"
407 Second sentence under Creating Cookies The syntax for the cookie property is document.cookie = name=value;
409  Last item on page Replace Time Zone with TimeZone
410 getDate() Change Description to "Returns the date of the month (1-31) of a Date object
410 getDay() Change Description to "Returns the day of the week (0-6) for Sunday-Saturday of a Date object
410 getMonth() Change Description to "Returns the month (0-11) of a Date object"
410 getTime() Change Description to "Returns the milliseconds elapsed since January 1, 1970"
410 set Date() Change Description to "Sets the date of the month (1-31) of a Date object
410 Last method in box Replace ToLocaleString() with toLocaleString()
411 First code sample The expiration date must be in GMT format so replace the second line of code with the following code:
expiresDate.setFullYear(expiresDate.getFullYear()+1);
document.cookie = escape("firstName=Don" + "; expires=" + 
   expiresDate.toGMTString());
411 Second code sample The expiration date must be in GMT format so replace the second code sample with the following:
expires.setFullYear(expiresDate.getFullYear() - 1);
document.cookie = escape("firstName=" + "delete" + "; expires=" +
  expiresDate.toGMTString());
412 Code in part 3 The expiration date must be in GMT format and must be specified for each cookie, rather than specified at the end of a sequence of name=value pairs, so replace the second statement in the function with the following: 
expiresDate.setFullYear(expiresDate.getFullYear() + 1);
expiresString = "; expires=" + expiresDate.toGMTString();
var userCookies = "user_name + document.user_prefs.user_name.value + expiresString + 
"; user_color=" + document.user_prefs.user_color.value + 
expiresString;
 
413 First line of code Delete ) so that code reads document.cookie = "firstName=Don" + ";  path=/MyFiles";
413 Second line of code Delete ) so that code reads document.cookie = "firstName=Don" + 
"; path=/";
414 First line of code Delete ) so that code reads document.cookie = "firstName=Don" +
"; secure=true";
416 Function getUserPrefs() After each statement var end = curCookie.indexOf(";", start); add a new line of code:
if (end == -1) end = curCookie.length; 
[This is necessary because the last name=value pair in the cookie will not end with a semicolon

Last Modified December 11, 2001. Comments to William Pegram, wpegram@nvcc.edu