Client-Side JavaScript
JavaScript lets you keep client functions on the client
By Emily A. Vander Veer
JavaScript, currently implemented in Netscape Navigator and Microsoft's Internet Explorer, is nothing more or less than a lean, streamlined, interpreted C sitting on top of the HTML object model. JavaScript is object based, not object oriented: You can create your own objects just as you can in C with the struct declaration, but you can't inherit from other objects. JavaScript lets a function that logically belongs on the client data scrubbing, user feedback, and customized display stay on the client. Before the advent of JavaScript, the only way to add intelligence to your Web pages was to gather up the client data and fling it at a CGI program. In some cases, this will still be so; JavaScript doesn't pretend to replace the (virtually unlimited) functionality available with CGI programs. In other cases, however, JavaScript is clearly the wisest implementation choice. Why make a round trip from the client to a server halfway around the world just to figure out whether or not a user has entered a required field?
Client-side JavaScript is an extension to HTML, and its utility lies in giving programmers access to HTML objects, including forms, buttons, and input fields. In addition to programmatic access to input data, JavaScript provides standard calculation and event-handling capability. It's fairly basic, but keep in mind that JavaScript is just one power tool in an Internet-exploitative application developer's tool belt. JavaScript was designed to complement HTML, Java, Netscape plug-ins, and server-side CGI programs; not to replace any of them.