Page Location Edit
82 Figure 3-2 All collections should be plural and in lower case, i.e. forms[], options[], images[], links[], anchor[], layers[], applets[], embeds[]. Delete reference to "Area[]"
 82 Last sentence Replace "form[0], form[1], form[2], and form[3]" with "forms[0], forms[1], forms[2], and forms[3]"
 83 Second sentence Replace "img[0]" with "images[0]"
83 Last sentence  of first paragraph under Properties, Methods, and Events Replace code btnSubmit.value = "Submit me" with document.form1.btnSubmit.value = "Submit me"
 84 Last three sentences of paragraph above code sample  Beginning with sentence "When the user places the mouse pointer over the second hyperlink" substitute the following text: "When the user places the mouse pointer over the second hyperlink, the status message will display the URL specified in the link; when the mouse is removed from the link, the status message will change to that specified in the JavaScript.  The return false statement in the second hyperlink makes the browser take the default action from mouseover of a link (display of the URL).  The return true statement in the first hyperlink prevents the browser from taking this default action.  Unfortunately the behavior of return true and return false varies depending on the HTML element."
85 First code sample  Replace the code line beginning onClick with the following:
onClick = "window.alert('1-800-555-5555');">
86 Last line Replace code with window.defaultStatus = "Course Technologies"
87 Second sentence below code sample Replace the phrase beginning "The two hyperlinks below" with "The hyperlink below"
89 Second code sample Replace document.close() with window.close()
89 Last code sample In window.open method, there should be no spaces within the third argument to enable this to work in Netscape, should it should read "height=200,width=400,status=no,toolbar=no,menubar=no,location=no"
90 Second line of first code sample Replace strH = strH "Office Supply Unlimited" with:
strH = strH + "Office Supply Unlimited"
100  Third code sample Replace onClick = 'javascript:history.back()';> with
onClick = 'history.back()';> [Rationale: the javascript: keyword here adds nothing
100 Programming tip Replace current tip with the following: "You can use the keyword javacript followed by a colon followed by JavaScript statements anywhere you would write a URL." [Rationale: Second sentence of current tip doesn't make sense because one can't use script tags within an HTML object, instead one uses event handlers..
 103 Last sentence before third code sample Replace "reads the cookie into a variable named ReadCookie" with "reads the cookie into a variable named readCookie"
105 Code under Form Properties section Replace document.form[indexNumber].property with document.forms[indexNumber].property
Replace document.form[formName].property with
document.forms[formName].property

Add a third possibility: document.formName.property
105 Last sentence in second to last paragraph Replace "use document.form.length" with document.formName.length
105 First sentence of last paragraph Replace form[0] with forms[0]
105 Third sentence of last paragraph Replace form[3] with forms[3]
105 Fifth sentence of last paragraph Replace "The first text box can be identified as textbox[0]" with "The first element can be identified as elements[0]"
105-106 6th sentence of last paragraph Delete everything beginning with the sentence "The type of elements and the index number identify each element" through the sentence "Therefore, the complete name for the first text box on the first form of the page would be document.form[0].textbox[0].name" [Rationale: One can refer to the form elements by the elements[] array but all attempts to refer to the type of form element, and to subscript this, produce errors]
111 6th sentence of second paragraph Replace "The length property retrieved as document.select.length" with "In a select object named product in a form named form1, the length property retrieved as document.form1.product.length"
111 Second to last sentence of second paragraph Replace "The size property is retrieved with document.select.size" with "The size property is retrieved with document.form1.product.size"
111 4th sentence of last paragraph Replace "The first item has an index number of zero and is called option[0]" with "The first item has an index number of zero and is called options[0]"
111 6th sentence of last paragraph In the sentence beginning "To retrieve the selectedIndex integer" replace "select" with "product" and "selected Index" with "selectedIndex"
 115 Under "To open a new window" So that it works in Netscape, delete spaces in the third argument so that it reads
"height=200,width=400,status=no,toolbar=no,menubar=no,location=no"

Revised: December 18, 2001 Comments to William Pegram, wpegram@nvcc.edu