By John Pollock

Corrections

The list below corrects misprints or errors in the book that I or others may find while reading. If you find something that is not on this list and want to let me know, fill out the form on this page. Thanks!

Page 32
Page 53
Page 56
Page 92
Page 210-211
Page 258
Page 292-296
Page 396
Page 402
Page 529


Page 32

Question 9 should read as follows:

9. To write a string of text on a Web page, the __________ method is used.
    A document.write()     B document.print()     C document.type()     D window.print()


Page 53

Under the "Adding Variables to Text Strings" heading, the first browser text example should read as follows:

I like driving my Corvette
Second browser text example should read as follows:

I like driving myCorvette


Page 56

Last code listing should read as follows:

var begineffect="<B>";
var endeffect="</B>";
var newsection="<P>";


Page 92

The strings for step 2 should be "Regular" and "text!".
The strings for step 3 should be "Hi" and "there!".


Page 210-211

The downloadable code for the project contains different values. Updated code for this project follows:

<HTML>

<HEAD>

<SCRIPT language="JavaScript">
<!-- 
function get_price()
{
var the_price=1000;
 if(this.speed == "2GHz")
  the_price+=200;
 else
  the_price+=100;
 if(this.hdspace == "80GB")
  the_price+=50;
 else
  the_price+=25;
 if(this.ram == "1GB")
  the_price+=150;
 else
  the_price+=75;
return the_price;
}

function computer(speed,hdspace,ram)
{
this.speed=speed;
this.hdspace=hdspace;
this.ram=ram;
this.price=get_price;
}

var work_computer= new computer("2GHz","80GB","1GB");
var home_computer= new computer("1.5GHz","40GB","512MB");
var laptop_computer= new computer("1GHz","20GB","256MB");

var work_computer_price= work_computer.price();
var home_computer_price= home_computer.price();
var laptop_computer_price= laptop_computer.price();

//-->
</SCRIPT>

</HEAD>

<BODY>

<SCRIPT language="JavaScript">
<!-- 

document.write("<H2>The information on the computers you requested:</H2>");
document.write("<B>Work Computer: </B>");
document.write(work_computer.speed+","+work_computer.hdspace+","+work_computer.ram);
document.write("<BR>");
document.write("<B>Price:</B> $"+work_computer_price);
document.write("<P>");
document.write("<B>Home Computer: </B>");
document.write(home_computer.speed+","+home_computer.hdspace+","+home_computer.ram);
document.write("<BR>");
document.write("<B>Price:</B> $"+home_computer_price);
document.write("<P>");
document.write("<B>Laptop Computer: </B>");
document.write(laptop_computer.speed+","+laptop_computer.hdspace+","+laptop_computer.ram);
document.write("<BR>");
document.write("<B>Price:</B> $"+laptop_computer_price);

//-->
</SCRIPT>

</BODY>

</HTML>

The first paragraph on page 211 should read as follows:

If the speed property of an object is equal to 2GHz, add 200 to the value of the_price;
 otherwise, add 100 to the_price. If the hdspace property of an object is 80GB, add 50 to the
 value of the_price; otherwise, add 25 to the_price. If the ram property of an object is 1GB, 
 add 150 to the value of the_price; otherwise add 75 to the_price. End the function with
 a return statement that returns the value of the variable the_price.


Page 258

Under the heading "The open() and close() Methods", the first sentence should read:

The open() method allows you to open a new document and 
create its contents entirely with document.write()
or document.writeln() statements.


Page 292-296

All code blocks which include a form should have a </FORM> tag before the </BODY> tag.


Page 396

Under the "The link() Method" heading, the second code example should read:

<A HREF="http://www.pageresource.com">A Web Site</A>


Page 402

The last sentence (sample text) on the page should read:

i feel calm, really.


Page 529

Question #3- The answer should be:
A. True


Downloadable Code   Corrections   Where to Purchase
Desktop Stuff   Book Home Page   Osborne Site


Main Page  |  HTML  |  JavaScript  |  Graphics  |  DHTML/Style Sheets  |  ASP/PHP
PutWeb/FTP  |  CGI/Perl  |  Promotion  |  Java  |  Design Articles
Support Forums  |  Site Search  |  FAQs  |  Privacy  |  Contact

Copyright © 1997-2007 The Web Design Resource. All rights reserved. Disclaimer.