Head Rush Ajax by Brett McLaughlin 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 July 11, 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: (ix) Table of Contents; "4.5 A Second Helping: devloping dom applications" should be: "4.5 A Second Helping: developing dom applications" (xviii) 1st paragraph; "what's you've learned" should be "what you've learned" (xxxi) 2nd paragraph; ;he always sees to know just what's missing. should read: ;he always seems to know just what's missing. {xxxi} 3rd paragraph; "...you just keeping doing these Head First books..." should be: ..."you just keep doing these Head First books..." {xxxi}(beginning of 5th paragraph) "...You simple can't do..." should be: "...You simply can't do..." (9) Work it through, the arrow on the right; "Answers on page 9" should be: "Answers on page 63" (13) last block of text on page; elements don't create a new block of text, but can still by styled with CSS. should read: elements don't create a new block of text, but can still be styled with CSS. ^^ (17) FAQ: Answer to 2nd question; In other words, it's sort of like an aniti-value. should read: In other words, it's sort of like an anti-value. (31) Third handwritten note; "You'll added this Javascript" sould be: "You've added this Javascript" (38) First paragraph; "When you think about a web appl," should be "When you think about a web app," (or a web application) (49) 'Work It Through' box; There is no indication of where the answers are located (similar to the 'Work It Through' box on page 9) There should be an 'Answers on page 63.' notice somewhere on that page. [53] Just Do It Solutions; This is referring to text-utils.js I am not an expert on Javascript but to the best of my knowledge childNode.normalize does not exist. I cannot find any reference to it on Google. Also childNode.nodeType returns an integer, not a text value. So by commenting out childNode.normalize() and changing childNode.nodeType == 3 I was able to get the code running. (75) 3rd hand-written note on the right; "enter a different address if the want" should be "enter a different address if he wants" (86) 1st hand-written note on the left; "Since requset isn't created" should be "Since request isn't created" (100) First column, first answer; So all you need to do in your code is use the t variable. should read So all you need to do in your code is use the request variable. {108} 1st paragraph; "...and you're written a lot of new Javascript..." should be: "...and you've written a lot of new Javascript..." (109) Blueprints revisited, 1st line; "You haven't fogotten" should be "You haven't forgotten" (109) 'Handwritten' note pointing to request.responseText; '...store the server's reponse in...' should be '...store the server's response in...' [121] Break neck pizza screenshot; The textboxes on the screenshot should be inverted (order first, address last) {133} 3rd paragraph; "There's a different between the state..." should be: "There's a difference between the state..." [146] dowloaded example script coffeemaker.php; open coffeemaker.php script on line 5 replace: $coffeemaker = $_REQUEST['drink']; with: $coffeemaker = $_REQUEST['beverage']; Otherwise, the two alert boxes that signal the end of the coffee brewing for the two users will break. (146) This is in error in the errata!; The errata for 146 shows this: [146] dowloaded example script coffeemaker.php; open coffeemaker.php script on line 5 replace: $coffeemaker = $_REQUEST['drink']; with: $coffeemaker = $_REQUEST['beverage']; Otherwise, the two alert boxes that signal the end of the coffee brewing for the two users will break. BUT it should be $beverage = $_REQUEST['beverage']; and NOT $coffemaker =... {147} 2nd paragraph (handwritten paragraph on left); "The web page displays the status of the each coffee maker." should be: "The web page displays the status of each coffee maker." (149) 2nd paragraph (step 4); "Now, Jim has has mocha ..." should be "Now, Jim has mocha" {152} 1st paragraph; "We've gone ahead and written the HTML for placing and order..." should be: "We've gone ahead and written the HTML for placing an order..." {156} First answer in Q&A box; We decided to put the sendrequest() function in the ajax.js file. should read: We decided to put the sendrequest() function in the coffee.js file. {156} 1st paragraph after "Here's what we did..."; "We put all the code that creates and test the request object into common.js..." Should be: "We put all the code that creates and test the request object into ajax.js..." [160] description of the sendRequest() function; "sendRequest() sets up the callback function for the server response (serveDrink) and sends a GET request to the URL passed in from makeFreshCoffee()." "makeFreshCoffee()" should read "orderCoffee()". (173) hand-written note on the right; "on the seecond coffee maker" should be "on the second coffee maker" [176] PHP ...at a glance paragraph; On several pages, for instance 168, 170, 172, 174 etc the url for ordering the coffee uses parameters for name, size, beverage and coffeemaker, the PHP script on page 176 uses parameters name, size, drink and coffeemaker. (188) Blurb pointing at first order form.; "... your code sends a reuest to ..." should be "... your code sends a request to ...". [190] 1st paragraph; "With two request objects created and ready for use, you'll need to change updateCoffee()...." updateCoffee() should read orderCoffee() (190) Note point to function sendRequest; "..to your veresion of..." should be "..to your version of..." {205} middle, box "Find an element by its 'id' attribute"; Mg is actually magnesium, while manganese is Mn. (231) Box in the bottom right; Mg is the chemical symbol for magnesium, and Mn is the correct one for manganese. {236} 1st paragraph (under "You can!..."); "...with the nodeName and nodeValue proeprties..." should be: "...with the nodeName and nodeValue properties..." (237) hand-written note on the top left; "the nodeType proeprty" should be "the nodeType property" (238) 2nd paragraph, 3rd line; "make sure you understsand" should be "make sure you understand" [249] Adding line to html; IE 6.0.2900 displayed a blank page when the line as added as shown: The page only displayed after the line was changed to: (283) hand written comments to right of "Just Do It" box; "Be sure you uses" should be "Be sure you use" (283) Just Do It; The last sentence in the Just Do It box is truncated. "Once you've got that done..." (291) hand-written note on the bottom left; "showConformation() gets run" should be "showConfirmation() gets run" (295) Team Chat, second last text balloon; "...some servers have a maximum length that they'ss accept, to" should be: "...some servers have a maximum length that they accept, too" (301) 1st hand-written note; "... look up any responsees ..." should be "... look up any responses ..." (311) POST/GET dialog, POST's last comment; "I hear the next chapter callling" should be "I hear the next chapter calling" (315) Handwritten note at the bottom of the page; "...in a fille called..." should be "...in a file called..." (322) SQL Inspector, 2nd line; "script that is requested b getCustomerInfo()" should be "script that is requested by getCustomerInfo()" (327) 3rd hand written notes on right; "this time your validation detects and problem, and never" should be "this time your validation detects a problem, and never" (327) hand written notes on bottom; "PROJECT: CHAOS isn't get anybody's customer list" should be "PROJECT: CHAOS doesn't get anybody's customer list" (328) 2nd paragraph; "...your app from someone attaching you from a web front end" should be "...your app from someone attacking you from a web front end" (330) 1st paragraph, 1st line; lookpuCustomer.php should be lookupCustomer.php (339) last paragraph; "Server: What goes is zander..." should be: "Server: What good is zander..." [346] PHP ...at a glance; line: echo " is missing "; from the end (397) Last typeset paragraph; "...Termainal prompt:" should be "...Terminal prompt:"