avaScript is a compact, object-based scripting language for developing client and server Internet applications. Netscape Navigator interprets JavaScript statements embedded in an HTML page, and LiveWire enables you to create server-based applications similar to Common Gateway Interface (CGI) programs. This book describes the JavaScript language and its use in Navigator. For information on developing server-based JavaScript applications, see the LiveWire Developer's Guide.

What you should already know

This book assumes you have some basic background, including

How to use this book

This book is divided into three parts:

If you are new to JavaScript, start with Chapter 1, "Getting started" to start scripting your own pages immediately. Then continue with the chapters in Part 1, to learn more about JavaScript in Navigator. You may find it useful to skim the material in Part 2, particularly Chapter 7, "Object model." Use the reference material in Part 3 as necessary for details on specific topics.

If you are already familiar with JavaScript in Navigator, skim the material in Part 1, paying particular attention to the chapters that discuss more advanced topics: Chapter 3, "Using windows and frames" and Chapter 4, "More fun with scripts." You can then use the reference material as needed.

If you are a LiveWire application developer, use the material in Part 1 to familiarize yourself with the basics of JavaScript. Then read Part 2 for a more in-depth look at the JavaScript language. All the material in Part 2 is applicable to LiveWire JavaScript. You need to read only material on client JavaScript if you want to incorporate only client functionality into your applications.

Document conventions

Netscape Navigator runs on many different operating systems; the information here applies to all versions. File and directory paths are given in Windows format (with backslashes separating directory names). For Unix versions, the directory paths are the same, except slashes instead of backslashes separate directories.

Note: Figures that show screens were created using Windows NT. Screens on your platform may look different.
This book uses Uniform Resource Locators (URLs) of the form

In these URLs, server represents the name of the server on which you are running LiveWire, such as "research1" or "www," and domain represents your Internet domain name, such as "" or "" If you have configured your proxy, you might not need to specify your domain name when the client itself is within the domain. In general, italic items in URLs are variables, and items in normal Courier font are literals.

This book uses the following typographical conventions: