Errata

The following errors have been noted in the 3rd edition:

CHAPTER 2, page 21, 1st line:
"HTML tags are highlighted in blue" should be "HTML tags are highlighted in green" .

CHAPTER 4, page 63, Figure 4.1, line 15:
The extraneous quotation mark before http should be removed, i.e.,
onmouseout="this.src='http://balance3e.com/Images/mystery.gif';">

CHAPTER 4, page 63, last line:
"HTML elements (blue)" should be "HTML elements (green)" .

CHAPTER 4, page 67, Figure 4.6, line 13:
src="mystery.gif" should be src="http://balance3e.com/Images/mystery.gif" .

CHAPTER 5, page 83, Exercise 5.2, 2nd paragraph:
"Then modify the Javascript button..." should be "Then modify the Javascript code..."

CHAPTER 5, page 91, Figure 5.10:
In the second assignment, there should be a closing parenthesis before the semicolon:
contents2 = parseFloat(document.getElementById('userBox').value);

CHAPTER 5, page 94, 2nd paragraph:
The grades mentioned in the paragraph should match the formula below: 92 (homework) and 95 (midterm).

CHAPTER 7, page 125, Figure 7.4:
Using newer versions of Safari or Chrome, this page (lucky1.html) may not behave correctly in all cases. The problem is that these browsers now treat min and max as reserved names, automatically converting number values to strings when they are assigned to variables with these names. To avoid this, simply rename the variables, e.g., minValue and maxValue. Note: the variable names do not cause any problems in lucky2.html (Figure 7.7) since they do not appear in the context of a button.

CHAPTER 8, page 153, Questions 17 & 18:
Both of these questions should refer to Figure 8.6 instead of Figure 8.5.

CHAPTER 9, page 160, 3rd paragraph, last line:
"...and the associated memory cells is freed." should be "...and the associated memory cell is freed."

CHAPTER 11, page 212, 2nd bullet point:
"The wind chill is only valid if the temperature is at least 50 degrees" should be "The wind chill is only valid if the temperature is less than 50 degrees".

CHAPTER 11, page 212, Exercise 11.17:
The reference to Exercise 9.7 should be Exercise 9.17.

CHAPTER 12, page 220, 2nd paragraph:
"negative integer with the largest absolute value (2-31)" should be "negative integer with the largest absolute value (-231)".

CHAPTER 13, page 234, Figure 13.1, 22nd line:
There should not be a space between the exclamation point and the equals sign in the loop test:
while (roll1 != roll2) {     // WHILE NOT DOUBLES.

CHAPTER 15, page 275, Figure 15.1, 2nd line:
"len = str.lenght;" should be "len = str.length;" .

CHAPTER 15, page 84, Exercise 15.13:
References to source text from Figure 15.6 in this exercise and the subsequent paragraph should be Figure 15.7.

CHAPTER 16, page 302, Figure 16.15:
The third wire at the top left (extending from the 0 box) should be black instead of green.

CHAPTER 17, page 315, 5th line from bottom:
"If a + symbol is added before the final backslash" should be "If a + symbol is added before the final slash" .

CHAPTER 17, page 319-320:
The HTML Draft Standard now states that the split method, when called on an empty string, returns a single-item array, containing an empty string. As such, the 2nd paragraph in Exercise 17.7 and the Designer Secret must be updated:
    2nd paragraph in Exercise 17.7: "Calling the split method on an empty string produces an array containing one item: an empty string. Thus, clicking the button in this page without entering any numbers will result in the Average function attempting to convert the empty string to a number, resulting in NaN. To avoid displaying NaN as the average when the box is empty, modify average.html so that it tests whether the box is empty before attempting to process the contents. If empty, the page should display the message You need to enter numbers first!"
    Designer Secrets: "When using the split method to convert user input into an array, it is important to recognize that the text box might be empty and the code should act appropriately. One approach is to check for empty contents before processing the text box. Alternatively, you could continue to process the text box contents then check for a NaN result at the end. The predefined JavaScript function isNaN takes a single value as input and returns true if that value is NaN. For example, you could modify the average.html page from Figure 17.13 by checking whether the calculated average isNaN, and displaying a warning message in that case."

CHAPTER 18, page 344, 5th bullet point:
The number "17.000" should be "17,000".

CHAPTER 18, page 347, Figure 18.13:
The heading on each of the right columns should be 2009 (not 2006).

APPENDIX D, page 371, String table:
In the section labeled substring, all three code examples should call the substring method instead of charAt.