- Object Road Map:
A brand new Object Road Map and Quick Reference document for Netscape Communicator 4. It is a .pdf (Adobe Acrobat) file that prints out on both sides of two pieces of paper and folds into a convenient reference. The new version shows Navigator and Internet Explorer compatibility ratings for every Netscape Navigator object and its properties, methods, and event handlers. I use it all the time.
If you have the Acrobat reader plug-in, you can preview the entire document. Or download your choice of a Windows zipped version or Macintosh binhex version. The download versions include step-by-step instructions for printing, assembling, and folding the pages into a handy pamphlet format.
- Page 10:
In the section about plug-ins, I refer to a vector graphics plug-in by FuturWave. The company has since been acquired by Macromedia (the Director and Shockwave folks). In the process, the vector graphics product line has acquired a new name: Flash (for both the authoring program and player). It's neat stuff, and fills a gap in Macromedia's offerings.
- Page 95:
Listing 7-13 shows a script that intercepts JavaScript errors, displays them in a friendly manner, and offers a button to let the user send the error message to the page's author via e-mail (but e-mailing of forms does not work in MSIE 3). Anyway, the TEXTAREA object drawn in the error window needs a NAME attribute for the form to mail itself properly. Also, I recommend you add ENCTYPE='text/plain' to the <FORM> tag so that the error message comes back in the body of the e-mail message, rather than as an attachment. This is how I'd re-do the 6th and 5th statements up from the bottom of the page (additions in red):
errWind.document.write("<FORM METHOD=POST ENCTYPE='text/plain' ACTION=mailtTo:support@dannyg.com>")
errWind.document.write("<TEXTAREA NAME='ErrMessage' COLS=45 ROWS=8 WRAP=VIRTUAL>")
- Page 107:
The event handler for the second button at the bottom of Listing 7-18 incorrectly assumes that the newWindow variable becomes null if you manually close the second window. This is wrong, because the variable still exists no matter what happens to the second window.
You have two ways to handle this better. One is to force the browser to read a property from the second window to find out if it exists (I use the parent property in this example):
onClick="if (newWindow.parent != null) newWindow.close()"
If your audience is Navigator 3 and up (but not IE3), you can also use Navigator's window.closed property to test whether the window is still open:
onClick="if (!newWindow.closed) newWindow.close()"
- Page 115:
In the continuation of Listing 7-24, there is an extra double quote that doesn't belong. It is in the fifth line up from the bottom of the script. The line should read:
onClick="stopTimer()"><P>
- Page 141:
There is both an incorrect comment and word in Listing 7-36. It is intended that you visit Listing 7-32 before loading the page in 7-36. Also, the history.go("window") method should read history.go("Reload") as it does properly in the HTML file on the CD-ROM.
- Page 217ff:
Examples in Listings 9-5 through 9-9 that offer only one text field may appear not to work when you first try them. This behavior actually highlights the way HTML forms work: when a form has a single text field in it, a press of the Enter/Return key while the cursor is in the field automatically submits the form. Because the forms in these examples have no explicit ACTION set in their tags, they perform the default behavior, which is to reload the current page. In so doing, the onChange= event handlers you see in the examples are immediately pre-empted by the form submission.
To see the effects of the onChange= event handlers in these examples, press the Tab key or click outside the text box after you enter the desired text into the text box.
- Page 290:
The third line of the page has a typo. The single quote inline character is produced by a backslash and a single quote (\'). Since this was correct in the first edition, I can attribute the mistake to gremlins -- which, fortunately, appear to have been largely absent from this edition.
- Page 298:
An example line of code in the middle of the page has a brain-o. The result of onePlanet = solarSys[4] should obviously be Jupiter to match the assignment statement in Listing 11-5, not Mars.
- Page 316:
A few result strings in the Examples section of the string.substring() description had some errors introduced during copy editing. It seems that the copy editor didn't like my perfectly acceptable spelling of "daquiri," changing it to the equally acceptable "daiquiri." Of course, a copy editor is not a programmer, so he/she didn't realize the havoc the extra character causes to the results of a substring() method. Therefore, here is what the results would be if you should type in any of these examples:
"" (empty string)
"b"
"nana dai"
"nana dai"
"quiri"
That'll be the last time I believe an editor who says no one will touch the listings.
- Page 438: The Web page containing syntax details for the LiveAudio plug-in has moved. You can now find the LiveAudio Syntax info at Netscape's site (where it belongs). Netscape also posted the scripting syntax for LiveVideo and other plug-ins.
- Page 536:
The file dhHelp.htm for both versions of Decision Helper has some incorrect information in it. The results screen (or any screen) can be printed in Navigator 3.0x by selecting the frame, and choosing Print Frame from the File menu. The file is corrected in the examples linked from my JavaScript Page here, in case you want to see the final version.
- Page 565ff:
There is one more important item about MSIE 3.0 that you should know. While it is not strictly a scripting issue, it bites a lot of page authors. Here are the details:
Many Web page designers use Navigator's ability to submit forms via e-mail as a way to bypass writing server-side CGIs for handling form input (or they don't have access to CGIs on their server or ISP). Navigator makes it easy to assign a mailto: URL to the form's ACTION attribute, and 'text/plain' to the ENCTYPE attribute to nicely send form data as label=data pairs.
Unfortunately, MSIE 3.0 does not allow this. If you specify a mailto: URL as the ACTION attribute, MSIE presents the mail composition window, but none of the form data is included in the message or as an attachment. I know of no workaround for this omission.