Errata

Ajax Hacks

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 7
First code fragment

The way this is written, I don't think that the code
if (!request){
request = new ActiveXObject("Msxml2.XMLHTTP");
}
will ever be executed. The note on page 5 suggests that
the previous attempt to initialize the request via
request = new ActiveXObject("Microsoft.XMLHTTP");
will be successful if Msxml2 is present.

Anonymous   
Printed Page 20
Line 1

""docDisplay"" should be "docDisplay"

Anonymous   
Printed Page 20
line 7

request.setRequestHeader(""Content-Type"",
""application/x-www-form-urlencoded; charset=UTF-8"");
should be:
request.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded; charset=UTF-8");


Anonymous   
Printed Page 127
First code sample

<textarea name="tarea" rows="20" id="question" cols="20" onblur="if (this.value)
{doSomething();}">

The values for the attributes 'name' and 'id' should be swapped. Name should be
"question" and id should be "tarea".

Code used later on the same page ...document.getElementById("tarea");...
won't work otherwise.

Anonymous   
Printed Page 238
lines 7 and 8 of XML sample

The text reads that the last file referenced contains code for the application, but
the file is listed first in the XML instead of last

Lines 7 and 8 of the XML sample should appear after line 16 of the XML sample to be
consistent with the description.

Anonymous