digitalroom.net javascript & cgi javascript & cgi

There are already really some excellent JavaScript sources out there - this page is meant just a brief reference.

Note: Any tutorials, examples or source code posted here assumes a basic knowledge of HTML and the Web. Otherwise, things might not make much sense. You be the judge.


Quick Introduction

JavaScript is most commonly embedded in an HTML document, and interpreted by a web browser. This is known as client-side JavaScript and there is NO interaction with the web-server. On the other hand, server-side JavaScript (LiveWire - which I'm not really familiar with) is compiled and executed on the server. Client-side JavaScript and CGI scripts complement one another - they do not replace each other.

Certain things are possible in JavaScript which are not possible using CGI scripts (and vice-versa), and some things are possible in both. For example, the Guestbook on my homepage uses JavaScript to check the guestbook form when signing it (to make sure that the input is valid), a CGI program to parse the form and store the information on a web-server in a text file, and a CGI program to dynamically generate an HTML page when viewing it. Image rollovers are most commonly implemented using JavaScript (onMouseOver) event-handlers. This effect can also be achieved with a Java applet or an Active-X control.


JavaScript & Browser Compatibility

Different web browsers support different versions and implementations of JavaScript. Hopefully this table should clear some things up:

Browser JavaScript Version ECMAScript support
Netscape 2.0x JavaScript 1.0  
Netscape 3.0x JavaScript 1.1  
Netscape 4.0 -> 4.05 JavaScript 1.2  
Netscape 4.06+, 4.5 -> 4.8 JavaScript 1.3 Edition 1
Netscape 6.x - 7.x JavaScript 1.5 Edition 3
Internet Explorer 3.0x JScript 1.0  
Internet Explorer 4.0x JScript 3.0 Edition 1
Internet Explorer 5.0 JScript 5.0 Edition 1
Internet Explorer 5.1 JScript 5.1 Edition 1
Internet Explorer 5.5 JScript 5.5 Edition 3
Internet Explorer 6.0 JScript 5.6 Edition 3

  • Netscape's reference for various JavaScript versions is available at JavaScript Central.
  • Microsoft's reference for JScript is available here.

  • Brian Wilson maintains a timeline of browser release dates.

  • ECMAScript (ECMA-262) is the standardized scripting language for web browsers, which is based mostly on JavaScript and JScript.


    My Scripts & Articles

  • Date Selector (useful for error-checking in forms)
  • Dynamic Date Selector (# days change dynamically according to the specified month and year!)
  • Frame Protection (makes sure that pages load within the context of their frame)

    Other Sites & Resources

    The best place to get a comprehensive and complete documentation for different browsers is Netscape or Microsoft (listed in the table above).

  • JavaScript TIP of the Week keeps an archive of all past tips which should answer most of your how-to questions.
  • Danny Goodman's JavaScript Pages has some impressive JavaScript/DHTML examples.

    If you have any specific JavaScript questions your best bet is to post to the comp.lang.javascript newsgroup. You'll find that (in general) you will get a quick, informative response to your question.


    Last updated September 19, 2003