JavaScript: The Definitive Guide, 3rd edition by David Flanagan Unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. This page was updated August 26, 2002. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification UNCONFIRMED errors and suggestions from readers: (97) end of paragragh that begins with "In other words": The last word should be changed from "operators" to "operator". {156} 5th paragraph; The line: "a = new Array(10); // a.length == 10 (empty elements 0-9 defined)" Should be: "a = new Array(10); // a.length == 1 (element 0 defined)". This is what happens using NN 6.0. This implies that the 6th paragraph on pg 154 is also wrong..ie, "var a = new Array(10);" (158) first two lines under "9.2.1 join()": converts all the elements of an array to a string and concatenates them should be changed to converts each array element to a string and concatenates the resulting strings (160) last paragraph (above example code): "no elements are" should be "no element is". (169) 2nd paragraph of section 10.1.4: The final sentence of this paragraph in the 3/00 print reads: And /(ab|cd)+|ef)/ matches either the string "ef", or one or more repititions of either of the strings "ab" or "cd". The initial error appears to be (to quote emacs): "mismatched set of parentheses": /((ab|cd)+|ef)/ It appears that either way, the code will match correctly, but it's generally a good idea to group properly by matched sets of parentheses. {215} 3rd paragraph; The statement must include 'LANGUAGE' -- it is shown as: with the following: if (empty_fields) msg += "- The following required field(s) are empty:\n" + empty_fields + "\n"; if (errors) { msg += "\n"; msg += errors; } alert(msg); return false; } [example 13.5] per the online except from ch13: example 13.5; the code parses based on comma separated arguments, but URLs use ampersand as separator characters. [327] 5 lines from bottom: This is part of the DynEl.js cass listing. When I attempt to run it under Netscape I get a message that "this layer has no properties" at line 83 of the program (downloaded from your web site). {363} The figure on p.363 has a box in the JavaScript column containing 'string' and 'netscape.javascript.JSObject'. This is an error since script code never has netscape.javascript.JSObject objects (this is a Java class, after all). This Java class exists only in Java and is used to wrap JavaScript objects. If such an instance is ever passed back to JavaScript, then it is unwrapped and the original JavaScript object is passed to JavaScript instead. (I suppose this has gone unnoticed since not too many people are implementing LiveConnect in their browsers -- I'm working on implementing it for OmniWeb 4.1 for Mac OS X -- http://www.omnigroup.com/) [457] Date.setDay() Object is not mentioned or documented. All other Date.set*() objects are documented, but the Date.setDay() is not. (465) second paragraph after Description: The English expansion of UTC is (Coordinated Universal Time), not (Universal Coordinated Time). This bug may appear elsewhere in the book. {512} the book mentions about returning false from an onSubmit to stop a form submission. Per the Microsoft Website: "If the event handler is called by the onsubmit attribute of the form object, the code must explicitly request the return value using the return function..." so instead of just calling
you need to call The URL for the above info is http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onsubmit.asp?frame=true {627} middle of page, second code example: The code fragment: value = 1234; binary_value = n.toString(2); should probably read: value = 1234; binary_value = value.toString(2); or alternatively: n = 1234; binary_value = n.toString(2); for it to make sense and match up with the previous code example. {730} last paragraph: IE 5.0 and Communicator 4.72 behave in the opposite manner. I don't have any older versions of the browsers. The frameset onunload handler is invoked before the frames' onunload handlers. All Javascript documentation I can find describes this the same way you documented it. Everyone agrees it should work that way, but it doesn't!