JavaScript & DHTML Cookbook by Danny Goodman This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated April 18, 2007. 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 Confirmed errors: {45} example 2-2; Using the 'daysBetween' function as written, the number of days between the current date, 12-4-2003 (date1, using the Date() constructor with no parameters) and 12-3- 2003 (date2) is incorrectly calculated as 2. The problem occurs because the number of milliseconds is not being equalized between the two dates. AUTHOR: Within the context of the example provided, the code as printed operates correctly. The reader introduces a possibility, however, that warrants a note: If you use the current clock setting to create one of the date objects (i.e., use new Date() without any parameters), you should also reset the milliseconds of the two values to zero. You can accomplish this without adding any statements by assigning 0 to the optional second parameter of the date object's setSeconds() method (e.g., date1.setSeconds(0,0)). {199} last line; In function isValidRadio(radio), the first line is: var valid = false; but the variable is never used and the function does not need that line of code. {215} last paragraph; var regiondb = new Object() should be var regiondb = new Object(); (311) Code listing; The statement: if (ol.childNodes[i].childNodes.length > 0 && ol.childNodes[i].childNodes[ol.childNodes[i].childNodes.length - 1].nodeType childNodes[i].childNodes.length - 1].nodeType == 3) { should be: if (ol.childNodes[i].childNodes.length > 0 && ol.childNodes[i].childNodes[ol.childNodes[i].childNodes.length - 1].nodeType == 3) { (The source file is correct, however, so this typo probably crept in during editing of the book.) {429} In code for function init() immediately before "Discussion" section; The call to setTimeout should read as follows: setTimeout("drawTable('matchData')", 1000); {462} code block below third paragraph; 2nd code line, the right side of the statement: {src:" images/prods/x25.jpg", url="products/x25.html"}; should be: {src:" images/prods/x25.jpg", url:"products/x25.html"}; 5th code line; quotes.length should be: imgLinks.length 8th code line; insert semicolon after "