Here's where you'll find the scripts we used in the book. We've made them available to you in two ways: you can copy and paste any script by going directly to its page, or you can download the entire set of scripts for a particular chapter by clicking on the floppy icon next to the chapter title.
Included in the downloadable file for each chapter are the additional files needed to make the script examples work properly, when necessary. For example, in Chapter 3, when we're showing you how to do image rollovers, we used some GIF and JPEG files as examples. You'll find those files in the Chapter 3 download.
The several files for a chapter are compressed into a single file with Stuffit, a cross-platform (Macintosh and Windows 95, 98 & NT) archiving utility. If you don't already have the freeware Aladdin Expander 2.0 utility needed to expand the files, you can get it from the Aladdin Systems Web site. Aladdin Expander works with ZIP files, too, so it's a good program to have in any event.
Attention PC users!
Many PC users have reported problems downloading the chapters below. We strongly recommend that you download this zipped file instead. It's a 584K download that contains everything from the book.
Chapter 1: Getting Acquainted with JavaScript
What JavaScript is (Script 1.1)
What JavaScript can do
JavaScript isn't Java
The snap-together language
Handling Events
Values and variables
Assignments and comparisons
What tools to use?
Where to put your scripts (Script 2.1)
Hiding scripts from old browsers (Script 2.2)
Putting comments in scripts (Script 2.3)
Alerting the user (Script 2.4)
Redirecting the user (Script 2.5)
Browser detection and conditionals (Script 2.6)
Plug-in detection (Script 2.7)
Around and around with loops (Script 2.8)
Functions (Script 2.9)
Scrolling status bars (Script 2.10)
Status bar messages (Script 2.11)
Creating rollovers (Script 3.1)
Creating more effective rollovers (Script 3.2)
Triggering rollovers from a link (Script 3.3)
Creating cycling banners (Script 3.4)
Making the banner cycling wait for the user (Script 3.5)
Building slide shows (Script 3.6)
Displaying a random image (Script 3.7)
Combining a rollover with an image map (Script 3.8)
Automatically changing background colors (Script 3.9)
Chapter 4: Frames, Frames, and More Frames
Keeping a page out of a frame (Script 4.1)
Forcing a page into a frame (Script 4.2)
Loading a frame (Script 4.3)
Creating and loading a dynamic frame (Script 4.4)
Sharing functions between frames (Script 4.5 & Script 4.6)
Storing information in frames (Script 4.7 & Script 4.8)
Validating Email addresses (Script 5.1)
Selecting menu items (Script 5.2)
Working with radio buttons (Script 5.3)
Setting one field with another (Script 5.4 & Script 5.5)
Validating Zip codes (Script 5.6)
Verifying passwords (Script 5.7)
Chapter 6: Working with Browser Windows
Opening a new window (Script 6.1)
Scrolling a window (Script 6.2)
Bringing windows to the front (Script 6.3)
Updating one window from another (Script 6.4 & Script 6.5)
Creating new pages with JavaScript (Script 6.6)
Closing a window (Script 6.7)
Creating a control panel (Script 6.8 & Script 6.9)
Displaying alerts when a window is loaded (Script 6.10)
Chapter 7: Dynamically Updated Pages
Putting the current date into a Web page (Script 7.1)
Working with days (Script 7.2)
Customizing your message for the time of day (Script 7.3)
Converting military time to AM/PM (Script 7.4)
Creating a countdown (Script 7.5)
Working with referrer pages (Script 7.6)
Chapter 8: JavaScript and Cookies
Baking your first cookie (Script 8.1)
Reading a cookie (Script 8.2)
Using cookies as counters (Script 8.3)
Deleting cookies (Script 8.4)
Handling multiple cookies (Script 8.5)
Checking if Java is enabled (Script 9.1)
Determining a user's IP address (Script 9.2)
Getting the user's monitor size (Script 9.3)
Using Java to display text (Script 9.4 & Script 9.5)
Playing sounds using a plug-in (Script 9.6)
Playing a sound on a rollover (Script 9.7)
Chapter 10: JavaScript and Cascading Style Sheets
Moving an object (Script 10.1)
Moving CSS text (Netscape) (Script 10.2)
Moving CSS text (Internet Explorer) (Script 10.3)
Modifying a CSS drop shadow (Script 10.4)
Rotating a CSS shadow (Script 10.5)
Modifying a CSS glow (Script 10.6)
Chapter 11: Debugging Your JavaScript
Netscape's built-in debugger
JavaScript debuggers
Common errors (Script 11.1) (Scripts 11.2 - 11.6 demonstrate bugs)
Following variables while a script is running (Script 11.7)
Viewing values in another window (Script 11.8)
Writing error messages to another window (Script 11.9)
Chapter 12: Where to Learn More
Finding Help on the Web
Usenet newsgroups
Books
Chapter 13: Real World JavaScript
Starting Out (Script 13.1 & Script 13.2)
Giving users feedback with JavaScript (Script 13.3)
Sharing a .js file (Scripts 13.4, 13.5, 13.6)