Product Overview
Simply JavaScript
Corrections & Typos
Found a mistake that’s not listed here? Contact us to let us know!
First Edition, second printing: September 2007
- p.99 paragraph 4
"But you don't have to stop at getting..."
- p.170 2nd code block
The line beginning with
message =should startvar message =: concatenating the string in thesetTimeoutcall obviates the need to declaremessageas a global variable. (thanks to Jack Zelig) - p.218 code block 1
The last line of the first code example reads:
Core.init(DependentFields);This should be:
Core.start(DependentFields);The dependentfields.js file in the code archive has the correct method call. Thanks to Tim Burgess
- p.252 2nd code block
The regular expression sometimes fails in Firefox and Chrome, as using exec with the global flag will fail to reset the lastIndex property. As a result, clicking the Submit button twice will allow the form to be submitted with an invalid value. To fix this, explicitly set lastIndex to 0:
var classRegExp = /(^| )(\S+)\b/g; classRegExp.lastIndex = 0;
First Edition, second printing: September 2007
- p.62 1st paragraph
DOM nodes are not actually JavaScript objects, but are accessible via JavaScript (thanks to Scott Marcus). - p.78 3rd paragraph
"it paste" should be "is paste" (thanks to Yingchao Cai). - p.90 2nd code block
background-repeatshould bebackground-position(thanks to Tommy Olsson). - p.102 code blocks
Dojoshould bedojo(thanks to Kravvitz). - p.154,158 code blocks
Instead ofelement.parentNode.className == "accordion"useCore.hasClass(element.parentNode, "accordion")(thanks to Kravvitz). - p.181 note
'all non-zero CSS values' should be 'all non-zero CSS length values' (thanks to Scott Marcus). - p.185 2nd paragraph
"This properties" should be "This property" (thanks to Terry Johnson). - p.231-238 code blocks
element.getAttribute('for')andelement.setAttribute('for','someID')don't work in Internet Explorer. In IE you need to specify 'htmlFor' instead instead of 'for'. Alternatively, you can use the propertyelement.htmlFor, which is supported by all browsers (thanks to Kravvitz). - p.252 last code block
The regular expression should be:var classRegExp = /(^| )(\S+)\b/g;(thanks to Theodosis Landas). - p.273 last paragraph
"Forms" should be "wForms" (thanks to Kravvitz). - p.311 & p.333 code blocks
The call tosetRequestHeadermust occur after the call toopenbut before the call tosend(thanks to Joan). - p.336 1st paragraph
We only encode the values not the names and values (thanks to Kravvitz). - p.339 code block
Remove the erroneous semi-colon ';' from after the last item ("onComplete").
First Edition: June 2007
- p.1 footnote
“have a much” should read “have much”. - p.23 paragraph 6
Strictly speaking, there are limits on the number of decimal places that a floating point number may have. If you want to get really technical, there are limits on the degree of precision to which a floating point number may be represented. In practice, however, this will rarely impact on your scripts. - p.66 paragraph 1
“Either of the two” should be “Any of the three” (thanks to Gareth Rake). - p.90 2nd code block
background-repeatshould bebackground-position(thanks to Tommy Olsson). - p.135 paragraph 5
“hideTip method” should read “hideTipListener”. - p.140 important box
“supports aninnerHTMLon” should read “supports aninnerHTMLproperty on”. - p.258 code block
lass namestrackandthumbshould besliderTrackandsliderThumbrespectively (thanks to Chris Vickery). - p.316 paragraph 1
“Chapter 3” should be “Chapter 4” (thanks to Bil Herron). - p.365 2nd code block
The method name should of course beremoveEventListener. - p.365 paragraph 5
“This method prevent” should be “This method prevents”. - p.367 2nd code block
Missing semicolon near the bottom of this listing (thanks to Chris Vickery). - p.387
“"accordianContent"” should read “accordionContent”.
ebook only
Instant Download!
This title available in Adobe PDF, Kindle (mobi) and ePub (IOS) formats
