Back to the JavaScript home page Available at
About Chapters Examples Reference
Author Bios
Other Books
How to Buy
Check Out These Other Books!
home >> about >> errata


As with any project of this size, errors are bound to creep into the final product.

This page will be updated frequently to reflect all errors discovered in the first printing of JavaScript: The Complete Reference.

Please send any comments or errors to We apologize but we cannot respond to each individual inquiry.

Chapter 1

In the code listing, three lines from the bottom, the first </h1> tag should be <h1>

Chapter 3

The last sentence of this page references Appendix E. It should be Appendix C.

Chapter 5

First line under the section Recursive Functions, "While not always the almost efficient..." The word "almost" should be "most."

Second paragraph under the section Recursive Functions, last sentence, "...and which at point the results are returned..." should read "at which point the results are returned."

Chapter 6

The line that reads: for (varclient in customers) should read:
for (var client in customers)

Chapter 9

p. 269
! = should be != in example
(remove the space between the ! and =)

p. 290
Third line from the bottom, the word nodels should be models

Ch 14

In the example at the bottom of the page, type="button | reset | submit"
(ie, "reset" instead of "return")

p. 470
In the <textarea> tag the single quotes should be " "s

p. 471
In the <textarea> tag the single quotes should be " "s

p. 473
The bottom example uses “smart” quotes instead of "straight" quotes

p. 474 Example
The code is correct as-is, but the choice of names for variables and the HTML id/name attributes is rather confusing. The name/id of the radio button group is "radiogroup1." The name of the argument the function "showradiovalue" accepts is "radiogroup." On page 475 a reference to document.testform.radiogroup1 is passed to showradiovalue(). So a reference to the radio group named "radiogroup1" is placed in the variable "radiogroup." The length property of this object is then accessed correctly as "radiogroup.length."

p. 475
There are extra blank lines before and after second to last document.write( ) statement in example

p. 478
Formatting problems on page 478 in example (note final <option> cook</option>)

p. 482
Formatting problems for arrays values on cities["France"] and cities["New Zealand"]

p. 482-483 Example
If you have less than 3 entries per Country, the Options are not removed properly. To clear the options array just set its length to zero (or do so in addition to nulling the others out). In other words, replace the removeOptions function body with this one statement:
optionMenu.options.length = 0;
and it works with any length of items.
Note that the problem is that nulling elements out is *not* the same as clearing the array though it is used to trigger memory clean-up; it keeps the same array size but inserts null values.

p. 483
In <select> statement with id country there is an unnecessary blank line

p. 485
Top example has <input> indented but it isn't in the other example

Chapter 16

p. 570
In the example, var timeout should be var timeOut.

Chapter 19

p. 676
In the last line above the second code listing, "Request object" should be "Response object."

Appendix B

p. 903
blur ( ) - insert "NS2, IE3" after the word "since" on the second line

p. 913
setExpression (property, expression [,language]) - Add asterisk at end

p. 921
Notes, just above b (Document Object), add the word "to" in between 'is added' and 'the single array element.'

p. 929
Checkbox (Document Object)
  form Reference to the form in which the button is contained.
  type String indicating the type of the field, "button."
  blur( ) Causes the button to lose focus.
  click( ) Simulates a click on the button.
  focus( ) Gives the button focus.
In all of these property/method listings, 'button' should read 'checkbox'

Under Methods, toExponential facDigits should be fracDigits

Under Methods, the first two entries (alert(message) and addEventListener) are not alphabetical.


The first item under 'H' handleEvent() is mis-spelled hanldeEvent

About | Chapters | Examples | Reference | Site Map

© 2001, 2005 PINT Inc.
[contents and programming of the site]
© 2001 The McGraw-Hill Companies
[contents of the print work JavaScript: The Complete Reference]

Available at