JavaScript Application Cookbook

Errata for JavaScript Application Cookbook

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 .
Add a key in the question constructor in questions.js, then remove

any data representing the answers from the object and array logic.

Anonymous   
Printed
Page .
Add a value for each key to each question in the units array in

questions.js.

Anonymous   
Printed
Page .
Enable buildQuestion() so it reflects the key with each answer the

user provides.

Anonymous   
Printed
Page .
Remove gradeTest() and replace the call to it in buildQuestion()

with printResults().

Anonymous   
Printed
Page xi
under "What you should know,"

"This not a beginner's book." now reads "This is not a beginner's book."

Anonymous    Apr 01, 2000
Printed
Page 27
2nd paragraph from bottom

Ternary operator is used for the first time. Removed the word "again."

Anonymous    Apr 01, 2000
Printed
Page 37
Under "Display Banner Ads":

"If your site is gets a lot of traffic..." now reads "If your site gets a lot of traffic..."

Anonymous    Apr 01, 2000
Printed
Page 40

Figure 2-1: Caption now reads: "Are you ready for this?"

Anonymous    Apr 01, 2000
Printed
Page 46

1st sentence in 2nd paragraph now reads: "This application is based on user-defined objects (objects that you and I declare)."

Anonymous    Apr 01, 2000
Printed
Page 47

1st sentence should read: "To create (instantiate) your own object, you must first declare it somewhere, otherwise JavaScript won't know how to build objects of that type. That is, you must tell JavaScript about what goes into your object by means of a "blueprint." For this purpose, you declare a constructor function that contains the blueprint, like so:"

Anonymous   
Printed
Page 63
INFO

This fix is fairly large. Replace the entire Potential Extensions section of this chapter with the following text: Making It Cheat Proof One of the first things you might have said to yourself after tinkering with the application for awhile is, "Hey, I can just check out the answers reading the JavaScript source file." It would be a pain to go through each question and find the letter, but it can be done. You can remove the "Peeping Tom" factor by simply not sending the answers with the application and requiring the user to submit his or test results to a server for grading. We won't get into grading the test on the server, but it won't be much more involved than gradeTest(). OK, maybe somewhat, but the principles will be the same. To remove the grading feature and add the server-side submission feature you'll need to do the following:

Anonymous   
Printed
Page 66
All the copy from Converting to a Survey can now be ignored.

Anonymous   
Printed
Page 153
Figure 6-2. First timers fill in their name once ...

The figure is missing!

Anonymous   
Printed
Page 156
1st sentence under dhtml.js

"inerface" now reads "interface"

Anonymous    Apr 01, 2000
Printed
Page 227
1st paragraph, 2nd sentence.

"top-level members" now reads "a top-level member"

Anonymous    Apr 01, 2000
Printed
Page 259
2nd sentence from bottom:

added the word "to" after "set"

Anonymous    Apr 01, 2000
Printed
Page 266
OPTIONs list at bottom of page, last OPTION:

set of double quotes are no longer bold.

Anonymous    Apr 01, 2000
Printed
Page 303
Last line

"P.S.S" now reads "P.P.S."

Anonymous    Apr 01, 2000