Errata


Print Print Icon

Submit your own errata for this product.


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



Version Location Description Submitted By
Printed Page 18
The line: getDetails(this.title);

On page 19 it says you can run the code from page 18 and it shows the thumbnail-detail image if you click on for example the guitar. This is not true, cause of the line getDetails(this.title);

This line referce to a function that has not been created yet and has not been mentioned prior in the book. Cause of this function the test on page 19 will fail and leave some people confused on what they did wrong.

A solution would be to either mention to add the line later in the book or mention that for the test this line needs to be commented out.

R. Bos 
Printed Page 37
Bottom Left - Relax - Confused about getting your server-side program working?

The section says, "Flip to Appendix I for some help on getting things working on the server".

Unfortunately, "Appendix I" (or "Appendix i" as listed in table of contents) has only 5 topics, none of which have anything to do with setting up a server to run the php pages.

I had a look at the table of contents on http://www.headfirstlabs.com/books/hfajax/ and according to that there are supposed to be 10 topics in "Appendix i".

Anonymous 
Printed Page 45
in the right box

The Brazilian Portuguese version of Head First Ajax, called "Use a Cabeça AJAX" has thousands of errors. Some paragraphs doesn't make sense because of the translations errors. They changed Syncronous with Assincronous and others worse things... oh my God.... It's Terrible. But the book content is great!

Anonymous 
Printed Page 68/70
code samples on both pages don't match

Between pg 68 (and 67) and 70 there are differences in the code as follows:

pg 68: if (request == null);
pg 70: if (request = null);

pg 68: }else{
pg 70: else{

but both have 2 ending }, even though p68 ends one on the else line

Anonymous 
Printed Page 68
5th code snippet

a "}" is too much in "} else {"
or a "{" is missing at the end of the 3d code snippet
"if (request == null)"

Anonymous 
Safari Books Online 68
Code magnet at bottom

The code magnet that reads:

if (request == null)

should read:

if (request == null) {

The same error occurs on page 67 with the ordered code magnets.

Ian Robertson 
Printed Page 70
code block

The callback function is listed as:
"request.onreadystatechange = userNameChecked;"

In the magnets on page 67, 68, and everywhere else from the very next reference on page 73, it is listed as:
"request.onreadystatechange = showUsernameStatus;"

It doesn't look like "userNameChecked" is explained anywhere nearby.

-Nick

Anonymous 
Printed Page 70
if (request = null)

Chapter 2

pg 68 if(request == null)
} else {

pg 70 if (request = null)
else {

=============================
pg 68 request.onreadystatechange = showUsernameStatus

pg 70 request.onreadystatechange = userNameChecked

pg 76 showUsernameStatus

Anonymous 
Printed Page 79
3d action snippet

In Chapter 2, p.79 says: if a user clicks 'Register' button, the server returns an (empty) error form. However, it should never happen since this button has not been assigned to any action in the source code. So I'm confused, probably in the case of success the page thanks.html should be called, but it isn't referenced in the code...

Anonymous 
Printed Page 81
First text box

Page 81 describes how to modify a status element so that an image changes as a username is validated. The page has us actually make changes to the javascript, but there is no such status element in the HTML file that comes from the headfirst website. So it is impossible to test, and nowhere in the chapter does it have us add such an element. The reason why becomes clear later, eventually we use a completely different method to achieve the goal and do not need a status element. But it is kind of confusing at first, I kept looking to see if I had missed something where I needed to add the element. In the spirit of the books approach, perhaps explain this in the next printing so poor beginners like me do not worry we goofed or missed something. Thanks!

Anonymous 
Printed Page 110
bottom 3 functions

missing opening { on all 3 of the bottom functions

Anonymous 
Printed Page 110
6th Line of Code

Because references to images are gained using

document.getElementById("schedulePane").getElementsByTagName("img")

all images, including the logo, are allocated event handlers. Adding

if(currentImage.id != "logo")
{

}

around the event allocation code prevents the logo being allocated a useless event handler (unless of course you want to use one!)

Paracelsus 
Printed Page 116
var contentPane

var contentPane = getElementById("content");

should read var contentPane = document.getElementById("content");

Anonymous 
Printed Page 116
Next to last line

The "correct" fill-in the blank for the next to last line is shown as "getElementById"

I tried this and it did not work. Instead, I had to use

"document.getElementById"



Anonymous 
Printed Page 116
near bottom of page

it says:
var contentPane = getElementById("content");

should be:
var contentPane = document.getElementById("content");

Erik Holte 
Printed Page 119
function showTab()

The 'if / else' block in showTab() will append 'Top.png' or
'Down.png' when creating the image sources. This is inconsistent
with the XHTML fragment on page 114, where the image source
suffixes are 'Active.png' and 'Inactive.png'

Anonymous 
Printed Page 119
in the code example

"Top.png" should be "TabActive.png"
and
"Down.png should be "TabInactive.png"

Erik Holte 
PDF Page 127
declaration of variable in code snippet

The request variabele is scoped locally ('var' keyword). Making use of the initialized request object doesn't work in showSchedule() function.

Monkeytail 
Printed Page 130
Middle of highlighted code block

<h3> and </h3> appear to be using escape characters and not the actual characters of < and >.

Ryan Suematsu 
Printed Page 169
Mods for buttonOver (bottom third of page)

Modifications to function buttonOver():


The text says to change

this.className = "active";

to

me.classNameActivated = "active";


It should say to change it to

me.className = "active";

Anonymous 
Printed Page 183
Bottom left, text box

The box on the bottom left of the page says you can download examples that match the XHTML given on the page, but the examples on the HeadFirst site do not match the code. The code on the page 182 has a "form" element and on 183 that form is closed. The downloadable sample does not have that form element, and the printed page form refers to a "registration.php" which also does not exist in the downloadable example. Perhaps related, I noticed with the downloadable example for Chapter two that it includes a "thanks.html" file but that file is never used.

Anonymous 
Printed Page 183
Bottom left text box

The text says that we can download the images from from the Head First website in order for the site to work. If you download the "Mike's Movies Files" zip it does not contain the images, you have to download the finished version in order to get them. This means that in order to read/do the chapter, you have skip to the finished version.

Anonymous 
Printed Page 189
2nd bullet point

The 2nd bullet point says the program to check passwords has a URL of "checkPass.php" This file is not included in the example you download from Head First in order to work on the chapter, in order to get it you have to download the finished website which kind of defeats the purpose. It should come with the starter code.

Anonymous 
Printed Page 279
sample code for a win

The code in the book AND the downloaded code for the fifteen puzzle does not apply the CSS to show a win in IE 7 but does in Firefox .
Also the puzzle table looks terrible in IE 7.

Anonymous