
Updates for Readers
If you own a copy of Laura Lemay's Web Workshop: JavaScript, this is your first stop for updates, additions, and corrections. I'll keep
this list up-to-date as I find out about new developments.
Here's the list of updates and corrections so far, organized by chapter. Some of these link to other pages on this site for
more information. You should also watch the Tips and Tricks page for information on techniques
that aren't covered in the book, and the JavaScript News page for the latest developments in
JavaScript.
Last update: November 9, 1996
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 -->") 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
Chapter 14
- For a more up-to-date list of bugs in browsers than the one in this chapter, see the Bug Watch section of this site.
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);".
Chapter 18
- Page 313: The first paragraph states that "Netscape has announced that it will support [ActiveX controls] in a future version." This was an error, and should have read "has not announced." However, it turns out to be a prophetic error, because now Netscape
really has announced support for ActiveX. See the JavaScript News page for details.
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.
If you've found an error (technical, typographical, or otherwise) in the book, or noticed a new development in JavaScript or a
browser that affects the content of the book, let me know via email and I'll add it to the list. These will
also be corrected in future printings of the book.
michael moncur ... jsbooks@starlingtech.com