Download (direct link):
32 Part I: Building Killer Web Pages for Fun and Profit
Testing Your Script
The date-and-time-stamp application as it appears in Netscape 7.1.
Chapter 2: Writing Your Very First Script
Note: You can find a fancier version of the date-and-time-stamp application in Chapter 3.
If you don’t see a Web page similar to the one in Figure 2-3, however, don’t despair. Chances are good that the problem is due to one of the following situations:
^ The correct HTML file isn’t loaded. If you created your HTML file from scratch, you might have inadvertently mistyped a statement or otherwise introduced a bug. No problem; you can fix the bug later. (Chapter 17 is packed with tips for debugging your scripts.) For now, try loading the bug-free list0203.htm file from the companion CD.
^ If you’re using Internet Explorer 6.x, choose ToolsOInternet OptionsO Security. Then select the Internet Web Content Zone, click the Custom Level button, and scroll down until you find the Active Scripting category. Finally, ensure that the Enable option (right under the Active Scripting option) is selected.
34 Part I: Building Killer Web Pages for Fun and Profit
In This Chapter
Part I: Building Killer Web Pages for Fun and Profit
^ Conditionals: Conditionals are logical constructs that you can add to your script to decide whether a particular condition is true or false at runtime. The most basic conditional is i f-else.