JavaScript for the World Wide Web: Visual QuickStart Guide, Third Edition, 3rd edition
Authors: Tom Negrino, Dori Smith
Venue:  (1999)

From the Book:Welcome to JavaScript! Using this easy-to-learn programming language, you'll be able to add pizzazz to your Web pages and make them more useful for you and for your site's visitors. We've written this book as a painless introduction to JavaScript, so you don't have to be a geek or a nerd to write a script. Pocket protectors will not be necessary at any time. As a friend of ours says, "We're geeky, so you don't have to be!" We wrote this book for you We figure that if you're interested in JavaScript, then you've already got some experience in creating HTML pages and Web sites, and you want to take the next step by adding some interactivity to your sites. We don't assume that you know anything about programming or scripting. We also don't assume that you are an HTML expert (though if you are, that's just fine). We do assume that you've got at least the basics of building Web pages down, and that you have some familiarity with common HTML, such as links, images, forms, and frames. How to use this book Throughout the book, we've used some devices that should make it easier for you to work with both the book and with JavaScript itself. In the step-by-step instructions that make up most of the book, we've used a special type style to denote either HTML or JavaScript code, like this: window.status You'll also notice that we show the HTML in uppercase, and the JavaScript in lowercase, which makes it easier to distinguish between the two on a Web page. Whenever you see a quote mark in a JavaScript, it is always a straight quote (like " or "), never curlyquotes (aka "smart" quotes, like' or "). Curly quotes will prevent your JavaScript from working, so make sure that you avoid them when you write scripts. In the illustrations accompanying the stepby-step instructions, we've highlighted the part of the scripts that we're discussing in red, so you can quickly find what we're talking about. We often also highlight parts of the screen shots of Web browser windows in red, to indicate the most important part of the picture. Because book pages are narrower than computer screens, some of the lines of JavaScript code are too long to fit on the page. When this happens, we've broken the line of code up into one or more segments, inserted this gray arrow - to indicate that it's a continued line, and indented the rest of the line. Here's an example of how we show really long lines in scripts. document.write("You're running Netscape Navigator, a fine JavaScript-enabled-browser.") Don't type that code! Some JavaScript books print the scripts, and expect you to type in the examples. We think that's way too retro for this day and age. It was tough enough for us to do all that typing, and there's no reason you should have to repeat that work. So we've prepared a companion Web site for this book, one that includes all of the scripts in the book, ready for you to just copy and paste into your own Web pages. The site also includes additional tips and scripts. If we discover any mistakes in the book that got through the editing process, we'll list the updates on the site, too. You can find our companion site at: http://www.chalcedony.com/javascript/ If for some reason you do plan to type in some script examples, you might find that the examples don't seem to work, because you don't have the supporting files that we used to create the examples. For example, in an example where a sound plays when you click an on-screen button, you'll need a sound file. No problem. We've put all of those files up on the book's Web site, nicely packaged for you to download. You'll find one downloadable file that contains all of the scripts, HTML files, and the sound and image files we used. Time to get started One of the best things about JavaScript is that it's easy to start with a simple script that makes cool things happen on your Web page, then add more complicated stuff as you need it. You dorft have to learn a whole booles worth of information before you can start improving your Web pages. Of course, every journey begins with the first step, and if you've read this far, your journey into JavaScript has already begun. Thanks for joining us, and please keep your hands and feet inside the moving vehicle. And please, no flash photography.