JavaScript Bible (6th Edition) Support Center

Corrections & Updates

Note: Page numbers marked "BC" are from the Bonus Chapters on the CD-ROM.

  • Page 22. Listing 3-1 has some extra HTML in it, notably a double <h1> and <hr> tag. It doesn't affect the scripting, but looks funky (and not exactly like Figure 3-3 on the previous page. Simply eliminate the first set of tags.
  • Page 137. In the first text paragraph, I mention that the href="#" placeholders in the example code cause the page to reload if you click on the links. While this was true for older browsers, recent browsers don't appear to do that. I suspect that browser makers gave into the common—but technically not correct for production—use of this address as a way to disarm a link. If you intend to assign scripted action to such a link, the link should still contain a valid URL that works for visitors with JavaScript turned off or those using accessibility-enhanced browsers that don't respond to scripting. I didn't want to burden this example with unnecessary URLs that don't add to the lesson.
  • Page 138. Around the middle of the page (paragraph beginning "Some CSS property names"), the second sentence should read: "When that occurs, the scripted equivalent of the property compresses the words and capitalizes the start of each word after each hyphen."
  • Page 364. A clarification about the onresize event description. This event fires on the window and/or document object for all browsers. In IE, however, the event also fires on sized elements, such as when a script modifies the dimensions of an img element object.
  • Page 905. The syntax prototype for the string.substring() method should show the second parameter inside square brackets because it is optional:
       string.substring(indexA[, indexB])
  • Page 1041. Line 8 of the bottom code group should read:
       return false;
  • Appendix A. I corrected the position of several superscripted notations. You can download the updated version.

Updated Listings

  • Chapter 15. Listing 15-34 has two typos, but the don't affect the operation of the page. The content of the <title> and <h1> tags should both read:
    onblur and onfocus Event Handlers
  • Chapter 56. One of the example files on the CD-ROM is named incorrectly, causing the map game app to malfunction. When you copy the files from the CD-ROM to your hard disk, change the file named DHTMLapiXX.js to just DHTMLapi.js.