Book Section
-----

Teach Yourself
JavaScript 1.5

-----
About the Book
Examples
Downloads
Exercises
Errata/Notes
Other Books

General Section
-----
Discussion Forum
Articles / Tips
JavaScript Links
About the Author
Privacy Policy
Contact Me



Other Sites
-----
Website Workshop
JavaScript Weblog
Errata - Teach Yourself JavaScript 1.5 (Second Edition)
  • Last Update: 1/30/2002

The following are corrections and issues confirmed by the author for the first printing of Teach Yourself JavaScript in 24 Hours, 2nd Edition. If your copy is a later printing, it may already include one or more of these corrections. If you notice an error not on this list, please contact the author.

Content Corrections

  • Hour 5: Using Variables and Functions
    • Page 60, Listing 5.5: In the function declaration on line 2, Average should be capitalized.
  • Hour 6: Using Strings and Arrays
    • Page 78, list of examples at top of page: Some of the examples are incorrect. The fourth example should read: alpha.substring(6,8) returns GH. The fifth should read: alpha.substring(24,25) returns Y. The sixth should read: alpha.substring(0,26) returns the entire alphabet.
  • Hour 7: Testing and Comparing Values
    • Page 96, answer to Question 1: The correct answer is C, not A. The description in the answer is correct and describes option C.
  • Hour 11: Creating Custom Objects
    • Page 141, code listing for PrintCard() function: the last occurrence of "<br>" should read "<hr>".
    • Page 144, Listing 11.3: In lines 15 and 16 of the listing, this.work_phone should be this.workphone and this.home_phone should be this.homephone.
  • Hour 12: Responding to Events
    • Page 152, code example at top of page: The function keyword should not be capitalized.
    • Page 154, code example at bottomof page: The function keyword should not be capitalized.
  • Hour 13: Using Windows and Frames
    • Page 168, Listing 13.2: Between lines 25 and 26, a </form> tag is missing.
    • Page 173, Listing 13.6: Between lines 3 and 4, a </head> tag is missing.
  • Hour 14: Getting Data with Forms
    • Page 188, Listing 14.1: In lines 19, 21, and 23, "LENGTH" should read "SIZE"
    • Page 190, Listing 14.2: The <form> tag on line 9 is missing an attribute: method="POST". However, see the note under Browser Issues below.

Browser Issues

  • Hour 10: Working with the Document Object Model
    • Page 132, "Accessing Browser History": For security reasons, today's browsers don't support the history.current, history.next, and history.previous objects.
  • Hour 12: Responding to Events
    • Page 152, "Using the event Object": The properties listed here are correct for Netscape but incorrect for Internet Explorer. In particular, IE uses event.button to indicate the mouse button pressed and event.keyCode to indicate the key pressed.
  • Hour 14: Getting Data with Forms
    • Page 190, Listing 14.2: While this technique for sending form results by email works in some browsers, it is by no means universal. While making the change listed above will make it work in some browsers, I highly recommend using one of the many available CGI scripts instead.
  • Hour 15: Using Graphics and Animation
    • Page 196, Listing 15.1: Both Netscape 6 and Internet Explorer 5/6 don't display the onMouseOver descriptions in the status line for an image map if the HREF attribute is present. One workaround is to use an onClick attribute instead and use JavaScript to handle the links. Here's a corrected version using onClick.

Minor Corrections

  • Hour 2: Creating a Simple Script
    • Page 19, Note at middle of page: The Prime Meridian runs through Greenwich, near London, England. The International Date Line does not.
  • Hour 3: Exploring JavaScript's Capabilities
    • Page 35, Tip at middle of page: In the first sentence, "automations" should read "animations".
  • Hour 10: Working with the Document Object Model
    • Page 132, "Accessing Browser History": The history object has four properties, as listed, not three as mentioned in the heading of the bullet list.
  • Hour 14: Getting Data with Forms
    • Page 191, Listing 14.3: The text on line 24 refers to the Display button - it should say the Submit button.
(c) 1997-2002 Starling Technologies and Michael Moncur. Portions (c) Sams Publishing.