Chapter 16 Calendar Listings
See new versions that are Y2K-compliant.
The applications examples in Chapters 17 through 20 seem like perennial works in progress. If you've been watching my JavaScript page, you've seen me update a couple of the applications with new features or other experiments in solidity. For the benefit of my readers, I now make it possible to conveniently download entire suites of documents for each of the applications.
Chapter 17: A Lookup Table
I haven't made any changes to this application since the book's CD-ROM went to press.
Chapter 18: Outline-Style Table of Contents
I'm proud to say that this has turned out to be quite popular among Web site designers. It has also undergone the most improvement since the CD-ROM, including better fixes for the 'reentrant window' error, support for non-linked entries, and faster redraw for outlines with more than 20 entries. One brave soul has implemented this outline with more than 300 entries! See comments at the top of the 'foodol.htm' file for the most recent additions and implementation notes.
A new upgrade prevents reloading of the outline when the user clicks on the icon of a fully nested item.
Chapter 19: Resistor CalculatorWhat is new, however, is a version I hinted at on page 466: a version that uses fields in a zero-height frame for persistent storage, rather than the cookie. Both versions have been on my site for awhile, but here you can download the full set of files for both versions as you wish.
Appendix A: JavaScript Object Road Map (Page 486)
It turns out that the <FRAMESET> tag errors on pages 118 and 468 propagated to both versions of the on-line help. You can now download updated versions for both platforms.
var newObj = new Object()
After that, you can populate entries of the array just like the type of array you'd make with a constructor:
newObj[1] = "Fred"
newObj[2] = "Elaine"
If you want to assign a length property, then you still must do it manually until Navigator 3.0 gives us true array objects that track their sizes dynamically on their own.
When I have a date-centric application, I start the script by setting a global variable with the offset value as determined by JavaScript:
var now = new Date(0)
var dateAdjustment = now.getTime()
For non-Mac Navigators, this comes to zero (except for Navigator 2.0 and 2.01 for Windows 3.1--an internal bug triggers a bogus 'divide by zero' script error), so it is now safe to subtract this dateAdjustment value (which is in milliseconds) from any date object prior to invoking a date method.
If you liked the object roadmap on page 486, then you'll love the new one for Navigator 3.0. With so many more objects and new properties, I've had to expand its size a bit. The new file is an Adobe Acrobat (.pdf) file, ready for display or printing through Acrobat or Adobe's Acrobat plug-in.
The roadmap prints on two sides of an 8-1/2 x 11 inch page (A4 users, try the Shrink to Fit choice in the Print dialog). Print page 1 from your paper tray; print page 2 manually. The result is a nice little folding reference for JavaScript's objects (their properties, methods, and event handlers). New items for Navigator 3.0 are marked. Download roadmap .pdf file now (12K).
Interested in the latest developments for Netscape Communicator? The Object Roadmap has been updated for this latest Netscape offering. 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.
It's a nasty business for some page authors, I know, but the scripts from my JavaScript pages have been running quite smoothly in Navigator 3.0 without modification from their 2.0 incarnations: It is possible to have it both ways!