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 83
getCookie and deleteCookie functions

Example 3-2 is supposed to highlight differences from Recipe 1.10 but not all differences are highlighted.

The "this" keyword is added in the getCookie function:

return this.getCookieVal(j);

The "this" keyword is added in the deleteCookie function:

if (this.getCookie(name)) {

Anonymous 
Printed Page 92
Last Code Segment function myFuncA()

Is it correct to define the nested function as

function.myFuncB() ?

Shouldn't it be

function myFuncB()?

Anonymous 
Printed Page 92
Last Code Segment function myFuncA()

Is it correct to define the nested function as

function.myFuncB() ?

Shouldn't it be

function myFuncB()?

Anonymous 
Printed Page 211
near bootom of page

Example 8-3 P209-212 page 211 near bottom of page, the code references a perl script I can't find anywhere. <form method="GET" action="cgi-bin/register.pl" .....>
Help

Robert Grant 
Printed Page 219
Code in Discussion

The markup is not legal XHTML. It uses
<p>
<input />
<input />
<div>
</p> <!-- Error -->
<p>
...
</p>
<p>
...
</p>
</div>
</p>

As there are more </p> than <p> in the example, it likely is added by mistake, and should be removed
altogether.

Anonymous 
Printed Page 239
the top of the page

This might be a picky one. Howevevr ...

In the function "removeEvent", the second clause of the "if" clause is checking if there is "elem.attachEvent".

To be exact, I thought that should have been checking if there is "elem.detachEvent".

Anonymous 
Printed Page 239
the top of the page

This might be a picky one. Howevevr ...

In the function "removeEvent", the second clause of the "if" clause is checking if there is "elem.attachEvent".

To be exact, I thought that should have been checking if there is "elem.detachEvent".

Anonymous 
Printed Page 405
final function within Example 13-1 (DHTML3API.js)

The DHTML3API.js function labeled "getInsideWindowHeight" contains flow control which is inconsistent
with API as a whole and fails to produce the desired result when processed by the IE6. In the following
reproduction I have highlighted the erroneous clause with '*>'

================================== *incorrect*
// Return the available contetn height space in browser window
getInsideWindowHeight : function () {
if (window.innerHeight) {
return window.innerHeight;
*> } else {
*> if (document.body.clientHeight != document.body.parentNode.clientHeight) {
*> // measure the html element's clientHeight
*> return document.body.parentNode.clientHeight;
*> } else {
*> return document.body.clientHeight;
*> }
}
return null;
}
=============================================*

When compared with a sister reference authored by Danny Goodman, "Dynamic HTML: The Definitive Reference,
Third Edition" (isbn 0-596-52740-3), which includes the same API labeled DHTMLapi3.js, the consistent and
correct flow control for this function can be found...

==================================== *correct*
// Return the available content height space in browser window
getInsideWindowHeight : function () {
if (window.innerHeight) {
return window.innerHeight;
} else if (this.browserClass.isIECSSCompat) {
// measure the html element's clientHeight
return document.body.parentElement.clientHeight;
} else if (document.body && document.body.clientHeight) {
return document.body.clientHeight;
}
return null;
}
=============================================*

As a side note, both publications include inconsistent terminators within the DHTMLAPI.init() function.
They work, but could cause some confusion; especially in light of DHTMLAPI object's short-cut syntax.

Anonymous 
Printed Page 411
Javascript solution, 13.6.2 Code

the last two lines of the javascript are missing the - such that they mean something else and don't work
correctly:

posElem.style.left = offsetLeft + parseInt(baseElem.offsetWidth/2)
parseInt(posElem.offsetWidth/2) + "px"

posElem.style.top = offsetTop + parseInt(baseElem.offsetHeight/2)
parseInt(posElem.offsetHeight/2)+ "px"

each of these are missing the - sfter /2) and sould read instead

posElem.style.left = offsetLeft + parseInt(baseElem.offsetWidth/2) -
parseInt(posElem.offsetWidth/2) + "px"

posElem.style.top = offsetTop + parseInt(baseElem.offsetHeight/2) -
parseInt(posElem.offsetHeight/2)+ "px"

Anonymous 
Printed Page 441-442
Entire Example

The example does not work.

I retyped the example from the book, correcting the stray closing brace on page 442 and the example
didn't work.

I then downloaded the code from the website, removed the error-producing dots in the middle (why not a
comment set off from the rest of the code or a note in the text of the book) and still saw... nothing.

Firefox 2.0.3/Mac OS X

Anonymous 
Printed Page 503
Bottom code example

An earlier example used quotes, it expands to show pictures.

It shows this code:

var imgLinks = new Array();
imgLinks[imgLinks.length] = {src:"images/prods/x25.jpg", url="products/x25.html", alt="X25 Super
Widget"};
...
function getRandomImage(imgElemID) {
var currIndex = Math.floor(Math.random() * (quotes.length));
...

The last line should be
var currIndex = Math.floor(Math.random() * (imgLinks.length));

Also, the declaration of imgLinks element is wrong: src:"" and url="" cannot both be right: Recipe 3.8
suggests it's src:"".

Anonymous