Topic: Web

Professional JavaScript for Web Developers, 2nd Edition (047022780X) cover image

Professional JavaScript for Web Developers, 2nd Edition

Nicholas C. Zakas
ISBN: 978-0-470-22780-0
Paperback
840 pages
January 2009
View Previous Edition of This Title
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
Intro XXX Error in Text
Under what you need to use this book:

In addition to the listed browsers and operating systems, the samples should work fine in Firefox on Linux.
2/27/09
22 Error in Text
Last bullet should be:

You can defer a script's execution until after the document has rendered by using the defer attribute. Though this attribute is part of the HTML 4.01 specification, IE and Firefox 3.5+ are the only browsers that have implemented it.
5/26/09
3 33 Error in Text
First paragraph, first sentence:

"arithmetic numbers"

Should be

"arithmetic computations"
7/31/09
35 Error in Text
Second paragraph from bottom. Fourth sentence should begin with:

If this first character isn't a number or the minus sign, parseInt()...
5/26/09
56 Error in Text
Modulus section:

Second bullet should read: "If the dividend is an infinite number and the divisor a finite number, the result is NaN."

Add bullet after second bullet: "If the dividend is a finite number and the divisor is 0, the result is NaN."

Fourth bullet should read: "If the dividend is a finite number and the divisor is an infinite number, then the result is the dividend."
5/29/09
60 Error in Texf
Equal and Not Equal. Third bullet under the "performing conversions" list should be:

If one of the operands is an object and the other is not, the valueOf() method is called on the object to retrieve a primitive value to compare according to the previous rules.
5/26/09
64 Typo in Code
Second code block, second line is missing a semicolon at the end of the line. Should be:

alert("Greater than 25");
5/29/09
73 Typo in Code
First sentence on page. No space should be between "Nicholas," and "how".
5/26/09
82 Error in Text
In the second paragraph under Argument Passing, in the second sentence, the following should be inserted before the period:

"(this is not possible in ECMAScript)".
5/26/09
83 Error in Text
Last paragraph, first sentence:

"redefine object"

Should be

"redefine obj"
5/26/09
90 Error in Text
Second paragraph, this sentence should be added to the end:

Note that in a browser, it's still possible to access the globally-defined color variable via window.color.
5/26/09
116 Error in Text
Last paragraph, phase "because \\ becomes \\\\"

should be

"as \\ becomes \\\\"
5/26/09
118 Error in Text
Second paragraph, second sentence:

Each string in quotes should have a space at the beginning, such as " and dad", " and baby", " and dad and baby".
5/26/09
119 Error in Code
Second code example. Change second line to:

var pattern = /\d{3}-\d{2}-\d{4}/;
5/26/09
124 Error in Code
First code example needs semicolons after each } character.
5/26/09
146 Error in Table
Fifth row, second column should be "The base 10 logarithm of E"
5/26/09
147 Error in Text
Third bullet:

"more than halfway to the next value"

Should be:

"at least halfway to the next value"
5/26/09
172 Error in Figure
Figure 6-5: the arrows from the SuperType prototype box's __proto__ and constructor are transposed.

The __proto__ arrow should point to the Object Prototype box and the constructor arrow should point to the SuperType box.
5/26/09
6 179 Error in Text
Paragraph at top of page:

Next, the clone object is changed to have a property called newProperty

Should be

Next, the clone object is changed to have a method called sayHi().
02/27/09
185 Error in Text
Last sentence before "Closures":

"anonymous functions"

Should be:

"recursive functions"
5/26/09
186 Error in Text
In the paragraph after code example, in the third sentence, "compare() function's scope chain" should be "compare() execution context's scope chain"

Also, in the first paragraph after diagram, the fourth and fifth sentences should be replaced with the following:

When the function is called, an execution context is created and its scope chain is built up by copying the objects in the function's [[Scope]] property. After that, an activation object (which also acts as a variable object) is created and pushed to the front of the context's scope chain. In this example, that means the compare() function's execution context has two variable objects in its scope chain: the local activation object and the global variable object.
5/26/09
187 Error in Text
First sentence after the first code example should read:

When the anonymous function is returned from createComparisonFunction(), its scope chain been initialized to contain the activation object from createComparisonFunction() and the global variable object.



Also, in the first code example, change "Michael" to "Greg."



Also, the last sentence after the first code example should read:

After createComparisonFunction() completes, the scope chain for its execution context is destroyed but its activation object will remain in memory until the anonymous function is destroyed, as in the following:



5/26/09
7 192 Error in Code
Block of code, following the paragraph ending “However, the following won’t work:”

})(); //error!

Should be

}(); //error!
02/27/09
200 Error in Text
First bullet under "Closures can also be used...":

"anonymous functions"

Should be

"closures"
5/26/09
200 Error in Text
Top of page:

"when anonymous functions are defined inside other functions"

Should be:

"when functions are defined inside other functions"
5/26/09
8 213 Error in Text
On page 213 there is a reference to a built in input() dialog box. This should be prompt().
03/08/09
216 Error in Table
Table, second row, second column:

First www.wrox.com should be removed, only www.wrox.com:80 should be there.
5/26/09
218 Error in Code
First code example, last comment should read:

//changes URL to "http://www.yahoo.com:8080/WileyCDA/
5/26/09
10 308 Error in Text
2nd block of grey shaded code:

“”code

Should be

“code”

in 2 places
5/7/09
314 Error in Code
Code reads:

for (var i=0, lens=divs.length; i < len; i++) {

Should be:

for (var i=0, len=divs.length; i < len; i++) {
12/30/2010
11 329 Error in Text
Box text. The last sentence should read:

IE supports only cssText, and Safari (version 3 and later) and Chrome are the only browsers that support getPropertyCSSValue().
7/31/09
12 389 Error in Text
On page 389 there is a list of mouse button values where two different combinations are specified as 1. The second one should be "3".
03/08/09
12 415 Error in Text
2nd sentence:

As with other browsers, dynamically created elements don't being downloading external resources until they are added to the page.

This should be:

As with other browsers, dynamically created elements don't begin downloading external resources until they are added to the page.
5/7/09
20 652 Error in Code
2nd code block should be:

for (var i=values.length-1; i >= 0; i--) {

process(values[i]);

}
5/1/09
20 652 Error in Code
3rd code block should be:

var i = values.length-1;
do {
process(values[i--]);
} while (i >= 0);
5/1/09
20 653 Error in Code
In the first code example on the page:

Math.ceil

Should be

Math.floor
7/31/09
20 653 Error in Text
In the paragraph after the first code example, the second sentence should be:

"The floor function is then used to ensure that the result is a whole number."
7/31/09