Previous Page TOC Next Page See Page



Introduction


Since Netscape introduced Navigator 2 in 1995, JavaScript has come to be accepted by many as a useful tool for adding interactivity to otherwise static Web pages.

In contrast to Java, which provides powerful capabilities but requires a strong programming background to manage, JavaScript offers a simple way to develop and deploy applications on a Web page.

Presently, JavaScript is the internal scripting language of Netscape's Navigator 3 and is one of two scripting languages available in Microsoft's Internet Explorer 3.0 Web browser. In addition, other vendors have indicated their interest in including JavaScript in their products in the future.

JavaScript has also moved from the client environment to be included as the scripting language in LiveWire, Netscape's client-server application development environment. LiveWire extends a server to support scripted client-server applications.

Given its integration into these leading browser and server products, JavaScript is an important tool for anyone developing sophisticated, interactive applications deployed using Web technology.

Goal of this Book


This book is designed to provide a firm understanding of JavaScript as it is presently deployed in Navigator, Internet Explorer, and LiveWire. After reading this book, you should be able to develop sophisticated client- and server-based applications using JavaScript embedded in HTML documents.

The book begins with a look at the basics of the JavaScript language, including its syntax, key objects and functions. and how to work with data and variables.

Part Two examines the client JavaScript as its implemented in Navigator 3. This includes coverage of the Navigator Object Tree, processing events triggered in the client, designing and producing interactive forms, maintaining client-side state information with Cookies, and using JavaScript to work with multiple frames.

Part Three moves to the server end and takes a look at the JavaScript implementation in the LiveWire and LiveWire Pro server extensions. Here you see how it's possible to produce server-based applications that can track individual clients using the application and generate dynamic content on the server before sending it to the client.

The fourth section looks at LiveConnect, Netscape's mechanism for connecting Java, plug-ins, and JavaScript in Navigator 3. Using LiveConnect, it's possible to call methods of Java applets from inside JavaScript, to do the same for plug-ins, and for Java applets to call JavaScript functions and methods. LiveConnect extends the functionality of all three beyond their own limitations allowing, for instance, JavaScript to produce Java graphical controls or for HTML buttons to be used to control a plug-in by using JavaScript as the middle layer.

Part Five provides four examples of complete JavaScript-based applications:

Finally, Part Six looks at Microsoft Internet Explorer. In addition to covering the JavaScript implementation in Internet Explorer and the Internet Explorer Object Model, Part Six also covers other additional features of Internet Explorer:

In addition, the appendixes provide a complete language reference, an HTML guide, a list of character entities and color names and values, and an introduction to Navigator Gold—Netscape's integrated Web page editor and browser.

Who Should Read This Book?


This book is designed as a developer's guide rather than a beginner's introduction to JavaScript. It is of interest to any Web developer looking to add interactivity to a Web sites, and application developers who want to deploy network-oriented client-server applications on an Intranet, or on the Internet, using Web technology to deliver applications to the desktop.

This book assumes that the reader has experience developing Web sites that use HTML, including forms, tables, and frames, and likely has experience using the Common Gateway Interface (CGI)—either on UNIX systems using PERL, C, or tcl, or on Windows or Mac systems.

It's helpful in grasping the programming concepts used in this book if you have previous programming experience in a structured programming languages like C, C++, Pascal, or Java. These concepts include arrays, procedures and functions, loops, variable scope, and logical operators.

Preparing to Begin


In order to take full advantage of this book, it is useful to have a copy of Navigator 3 to test the examples to experiment for yourself. Navigator 3 is available free of charge on all Windows platforms, for the MacOS, and for most major UNIX systems. You can download a copy from Netscape's Web page at http://home.netscape.com/, or from one of their numerous ftp servers and mirrors:

ftp://ftp.netscape.com/

ftp://ftp2.netscape.com/

ftp://ftp3.netscape.com/

ftp://ftp4.netscape.com/

ftp://ftp5.netscape.com/

ftp://ftp6.netscape.com/

ftp://ftp7.netscape.com/

ftp://ftp.leo.chuu.ac.jp/pub/WWW/netscape/ (Japan)

ftp://sunsite.ust.hk/pub/WWW/netscape/ (Hong Kong)

ftp://sunsite.huji.ac.il/Netscape/ (Israel)

ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/ (Australia)

ftp://susnite.doc.ic.ac.uk/computing/information-systems/www/Netscape/ (United Kingdom)

ftp://ftp.infomratik.rwth-aachen.de/pub/mirror/ftp.netscape.com/ (Germany)

ftp://wuarchive.wustl.edu/packages/www/Netscape/ (U.S.A.)

ftp://sunsite.unc.edu/pub/packages/infosystems/WWW/clients/Netscape/ (U.S.A.)

If you want to try Internet Explorer as an alternative browser, go to Microsoft's Internet Explorer Web page http://www.microsoft.com/ie.

Editing and Development Tools


In addition to a JavaScript-capable browser, it's important to find an editing tool with which you feel comfortable.

If you already do a lot of HTML coding, you probably have a favorite text editor which should be suitable for JavaScript programming. Basically, any text editor that produces ASCII text files can be used to editor JavaScript code.

You also may also want to look at Netscape Navigator 3.0 Gold, available from the many Netscape ftp servers and mirrors, as an alternative to a plain text editor. Navigator Gold combines the Navigator browser with a WYSIWYG (what you see is what you get) editing environment for HTML and JavaScript.

The ActiveX Control Pad from Microsoft, discussed in Part Six, also provides a functional tool for adding scripts to Web pages based on a model of providing actions for events. It probably represents the first truly drag-and-drop development environment for JavaScript (as well as VBScript, an alternative scripting language in Internet Explorer 3).

Previous Page Page Top TOC Next Page See Page