Book Section
-----

Web Workshop:
JavaScript 1.1

-----
About the Book
Examples
Downloads
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 - Laura Lemay's Web Workshop: JavaScript

Last update: November 9, 1996

Here is a current list of corrections and additions for Laura Lemay's Web Workshop: JavaScript. If you've discovered a typographical error or bug not mentioned here, please let me know by using the email page.

Chapter 1

  • Page 6: Listing 1.1 is missing a closing </TITLE> tag after the title.
  • Page 10: Listing 1.2 is also missing a closing </TITLE> tag.
  • Page 14: The <SCRIPT SRC=> function will only work properly if your server is configured to send .js files. See this tip for more information.
  • Page 17: The HTML comment in listing 1.3 should begin with <!--, not <!!. In addition, the end of the comment was printed as a long dash, but should be two hyphens. ("-->") The same errors occur in the example on page 18.

Chapter 2

  • Page 36: Under "The Modulo Operator," second paragraph: "b equals a modulo 2." should be "b equals x modulo 2."

Chapter 3

  • Page 62: In the NOTE, "Forth" should be "Fortran". Whoops.

Chapter 4

  • Page 77: In listing 4.2, the last three lines are missing the parentheses on the join() method. These should read .join()); in all three cases.
  • Page 78: In the last paragraph before the bulletted list, "So where do the 3 and the 7 come from?" should read "So where do the 3 and the 6 come from?". Ironically, the next sentence says "No, there is no typo."
  • Page 84: The text mentions that the navigator object may not be supported by non-Netscape browsers. As it turns out, MSIE 3.0 does support it, although not entirely. The properties dealing with Java, tainting, plug-ins, and MIME types are not yet supported in MSIE.
  • Page 84: The new navigator.taintEnabled() method is not mentioned. This method returns true if data tainting (see Chapter 10) is enabled.

Chapter 5

  • Page 91: The window.defaultStatus property should be mentioned. See Appendix A for its description.
  • Page 102: The description of the location.replace() method is not entirely correct. This method does send the user to another URL, like setting the location object; the difference is that the new location replaces the current one in the history list, so the back button can't be used.
  • Page 103: The document.location property still works, but Netscape has renamed it to avoid confusion. You should use document.URL instead, although document.location still works for now.

Chapter 6

  • Page 120: The form property is not mentioned. This is a property of each of the form element obects, and reflects the parent form object.
  • Page 133: In the last paragraph, "the & sign" should be "the @ sign".

Chapter 7

  • Page 149: You can add "ENCTYPE=text/plain" to your <FORM> definition to get more readable output (although still not perfect) in a mailto: form.

Chapter 10

  • Page 197: The navigator.taintEnabled() method should be mentioned. This method returns true if the user has enabled data tainting as explained on this page.
  • Page 197: Enabling data tainting also makes the elements of the history object available. Use window.history.length to check the number of entries; window.history[0] through the length are the history entries. (These are tainted values, so they can't be sent to a server.)
  • Page 203: The answer to the second Q&A question is incorrect. You can access another frame's variables as properties of its window object, as in parent.frames[1].varname. Data tainting comes into play if the scripts are from different servers, however.

Chapter 13

  • Page 235: Using sounds with helper applications works, but there's a better way using LiveConnect. (Netscape 3.0 only) See this tip and this example.
  • Page 241: Listing 13.3 will actually not show all of the MIME types; the if (i=55) break; statement on the last line of the script stops it early. This was to work around a bug in the beta versions of Netscape 3.0. If you're using 3.0b7 or later, you can remove this line and list all MIME types.

Chapter 15

  • The Poker Solitaire game does not always score straights correctly. There is a fixed version available from the examples page.

Chapter 17

  • Page 304: In the 10th line of the listing, there is an extra parenthesis at the end of the line; the line should read "$rqpairs = split(/[&=]/, $request);".

Appendix D

  • Due to last-minute changes, this list of what's on the CD-ROM is incorrect. (The front and back covers are correct.) For a complete list of what's really on the CD, see the README file in the CD's root directory, or run the CDGUIDE program for an interactive list.
(c) 1997-2002 Starling Technologies and Michael Moncur. Portions (c) Sams Publishing.