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 16
Page 44
Page 49
Page 119
Page 130
Page 138
Page 147
Page 229
Page 314
Page 332
Page 336
Page 337
Page 410
Page 444
Page 457
Page 530
Page 538


Page 16

Code listing should read as follows:

<SCRIPT>
JavaScript Code Here
</SCRIPT>


Page 44

Last paragraph should begin as follows:

Unlike stricter programming languages... 


Page 49

Third code listing should read as follows:

<SCRIPT language="JavaScript">
<!--
document.write("<B>JavaScript Rules!</B>\n This is fun.");
//-->
</SCRIPT>

The paragraph below the third code listing should begin as follows:

The \n special code...


Page 119

The first code listing should read as follows:

var population=4500;


Page 130

The third row of Table 5-9 should read as follows:

"A" <= "a" True Capital letters are less than lowercase letters


Page 138

Question #4 has two answers that return true, B and D. To fix this, answer D can be changed to read:
D. (1==1) && (2<0)


Page 147

The second line of the code listing should read as follows:

var meatloaf_recipe="yes";


Page 229

Step 7 should read as follows:
7. Add a call to the function created in step 6 to the computer object. Give
   the method the name "price."


Page 314

The second sentence after the first code listing should read as follows:
Normally, a function must be called outside quote marks.


Page 332

The second code listing should read as follows (note the last line):

var s_list= new Array(4)
s_list[0]="Thomas";
s_list[1]="Roger";
s_list[2]="Amber";
s_list[3]="Jennifer";
window.alert("The array has "+s_list.length+" elements");


Page 336

The last code listing should read as follows (note the last line):

var fruits= new Array("oranges","apples");
var veggies= new Array("corn","peas");
var meats= new Array("fish","chicken");
var three_groups=fruits.concat(veggies,meats);


Page 337

The second code listing should read as follows (note the last line):

var fruits= new Array("oranges","apples");
var veggies= new Array("corn","peas");
var meats= new Array("fish","chicken");
var three_groups=meats.concat(veggies,fruits);


Page 410

The first sentence should read as follows:
Here, you assign a string literal to the variable anchor_text. 


Page 444

The first question in the 1-Minute Drill should read as follows:

What form would be accessed by document.forms[1]?


Page 457

The first code listing should read as follows:

<HTML> 
<BODY onLoad="document.info_form.fav_food.focus();"> 
<FORM name ="info_form"> 
Your Favorite Food 
<INPUT type="text" name="fav_food" value="Pizza"> <BR> 
Drink <INPUT type="text"> 
</FORM> 
</BODY> 
</HTML> 


Page 530

The first code listing has a number of problems, and should read as follows:

<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function check_it()
{
 var tomatch=/[A-Za-z0-9]\w{2,}@[A-Za-z0-9-]{3,}\.[A-Za-z]{3}/
 var emadd= document.f1.t1.value;
 if (tomatch.test(emadd))
 {
 window.alert("E-mail Address OK"); 
 return true;
 } 
 else
 {
  window.alert("E-mail Address invalid. Please Try Again");
  return false;
 }
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM name="f1" id="f1" action="http://yoursite.com/cgi-bin/form.cgi"
 onSubmit="return check_it()">
Enter your e-mail address:<br>
<INPUT type="text" name="t1" id="t1"><br>
<INPUT type="submit">
</FORM>
</BODY>
</HTML>

As a result, the second code listing should read as follows:

var tomatch=/[A-Za-z0-9]\w{2,}@[A-Za-z0-9-]{3,}\.[A-Za-z]{3}/


Page 538

The second code listing should read as follows (note the use of the toGMTstring() method):

function set_it()
{
var thetext="quote=I have a quote&";
var toexpire= new Date("March 15, 2008");
var expdate="expires="+toexpire.toGMTstring();
thetext+=expdate;
var newtext=escape(thetext);
document.cookie=newtext;
}


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.