JavaScript Sourcebook: Create Interactive JavaScript Programs for the World Wide Web

Internet Research

ISSN: 1066-2243

Article publication date: 1 March 1998

344

Citation

Howell, K. (1998), "JavaScript Sourcebook: Create Interactive JavaScript Programs for the World Wide Web", Internet Research, Vol. 8 No. 1. https://doi.org/10.1108/intr.1998.17208aaf.007

Publisher

:

Emerald Group Publishing Limited

Copyright © 1998, MCB UP Limited


JavaScript Sourcebook: Create Interactive JavaScript Programs for the World Wide Web

JavaScript Sourcebook: Create Interactive JavaScript Programs for the World Wide Web

McComb, Gordon (1996), John Wiley & Sons, New York,NY (includes CD-ROM), 726 pp. including index, ISBN 0-471-16185-3, $44.95 USA. Available: John Wiley & Sons,Baffins Lane, Chichester, West Sussex, PO19 1UD, UK.Tel: 01243 770216; FAX: 01243 770432; URL: http://www. wiley.com/compbooks/.

This book is aimed at anyone interested in writing JavaScript programs. JavaScript is a scripting language for HTML authors that want more control and power over their Web pages but are not ready to learn a full-featured programming language like Java. JavaScript is not the same as Java. Unlike Java, JavaScript programs are not compiled and the program is not a binary file. JavaScript programs (also known as scripts) are included with the HTML statements in a Web page. JavaScript scripts can be developed with a text editor (though more sophisticated tools are available) and the code can be transmitted to a browser quickly. As a result, JavaScript appeals to nonprogrammers and programmers alike.

The author states that nonprogrammers, programmers unfamiliar with JavaScript, and programmers that are expert in JavaScript can all benefit from this book. He organises the information into several tiers so that programmers familiar with JavaScript can skip the first sections of the book. Nonprogrammers are directed to start with the introduction to JavaScript and basic principles of programming found in Part 1 of the book (Chapters 1-3). Programmers who do not know JavaScript start with Chapter 3, which gives an overview of JavaScript programming entities. Both nonprogrammers and programmers can benefit from the information in the remaining chapters of the book.

Part 2 (Chapters 4-10) is a reference manual of JavaScript objects, properties, methods, functions, expressions, statements, variables, and events. Part 3 (Chapters 11-16) covers uses of JavaScript in the real world including many JavaScript applications. Part 4 (Chapters 17-22) details advanced uses of JavaScript with HTML, CGI, Netscape plug-ins, and using JavaScript for sound, animation, and graphics. Appendix A explains how to use the CD-ROM of JavaScript routines that is included with the book. Appendix B visually organises JavaScript objects, properties, and methods into an object map.

Two chapters are particularly useful. Chapter 12, "How Do I?" answers common questions about how to use JavaScript with windows and frames, functions, forms, links and anchors, window histories, dates, and Netscape or other browsers. Chapter 14, "Fixing Broken JavaScript Programs," describes common problems, the 11 most common mistakes in JavaScript programming, and error messages and their causes and cures.

As a sourcebook of JavaScript code, this book is successful. There are routines listed in the book and contained on the CD-ROM for common user-defined routines, form validation routines, creating a calendar, using arrays for form input, using JavaScript with client-side image maps, using JavaScript to build a small database, and more JavaScript projects. The book is oriented toward the Netscape Navigator browser. Microsoft Internet Explorer supports JScript, based on the JavaScript features implemented in Netscape Navigator 2.0. Unfortunately, this book does not compare Jscript and JavaScript, and there is no advice on how to write JavaScript that both browsers can run.

Some of the information in a book of this type can become outdated almost as soon as, if not before, the book reaches the book store shelves. For example, the book is largely based on JavaScript 1.0, the implementation in Netscape 2.0. Netscape 3.0 was in beta form at the time the book was being written, and one chapter covers JavaScript 1.1 additions to Netscape 3.0. As this book review is being written in late June 1997, Netscape Navigator 4.0 has just been released, along with JavaScript 1.2.

As the author points out, no book can be completely up to date. The reader is referred to the author's Web support site at http://gmccomb.com/sourcebook/ for more current information. The Netscape Website and Netscape developer newsgroups should be consulted for the latest information on the evolving JavaScript language. However, as it is in Netscape's interest to keep JavaScript reasonably compatible with older versions of Netscape, it is unlikely that all the information in this book would become obsolete immediately. It serves its purpose of introducing would-be JavaScript programmers to programming principles and canned routines, while providing a convenient reference manual and sourcebook of ideas for more advanced JavaScript programmers.

Karen Howellkhowell@usc.edu Co-Coordinator, Center for Scholarly Technology, University Libraries, University of Southern California, Los Angeles, CA

Related articles