Designing with JavaScript

Errata for Designing with JavaScript

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page 7

lower sidebar -- change to read: A variable name must start with a letter, an underscore character, or a dollar sign. Subsequent characters can be letters, underscores, dollar signs, or digits. Thus, these are valid variable names: myCan, Can1, $Can, and _Can1. These are not: 1Can and !Can.

Anonymous   
Printed
Page 47
Footnote

The footnote mentions a Dynamic HTML technique covered in Chatper 9, but it isn't included in Chapter 9. Here it is - Here's the solution. Replacing each instance of 'window.document.width' in the script with 'document.body.clientWidth' (note capitalization) will work in both Netscape 6+ and IE5+. The exception ie IE6 when in "strict" or "standards compatability" mode, which is turned on by using a doctype tag like the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> In this case, rather than returning the width of the client window minus the scrollbars, document.body.clientWidth returns the width of the <BODY> element, which, in my tests, amounts to the width of the client window including the scrollbars. In this instance, use document.documentElement.clientWidth to get the same value as for all the other browsers.

Anonymous   
Printed
Page 126
Example 8-11

Insert the following line: var reg = document.forms["reg"]; as the first line after the comment in setValues(), so you have: // Set cookie values from form data var reg = document.forms["reg"]; setCookie(reg.yourname.name, reg.yourname.value, exp); Also, insert the following line: var reg = document.forms["reg"]; as the first line after the first comment in getValues(), so you have: // Get cookie values var reg = document.forms["reg"]; var namevalue = getCookie(reg.yourname.name);

Anonymous   
Printed
Page 127
Example 8-12

The sames changes as for Example 8-11.

Anonymous   
Printed
Page 175 & 176
Under "Making a Question object" the Question() constructor code and Ex. 11-11

In the Question() constructor, the second argument should be 1 not 2 on both pages.

Anonymous   
Printed
Page 189
Example 11-22

Change the line: setTimeout("showLayer()", 20); to read: setTimeout("xbStyleShowLayer()", 20);

Anonymous   
Printed
Page 189
Example 11-23

Change the line: var left = styleObj.getLeft(); to read: var left = styleObject.getLeft();

Anonymous   
Printed
Page 190
Example 11-23

Change the line: setTimeout("showLayer()", 20); to read: setTimeout("xbStyleShowLayer()", 20)

Anonymous