ToC ~ Up ~ Prev ~ Next ~ Index |
Introduction to HTML Last Update: 5 January 1998 |
With Navigator 2.0, Netscape introduced a SCRIPT element in the document HEAD or BODY. This element can contain a executable script, written in JavaScript, which can set up program functionality within the document itself.
Javascript is a simple scripting language, loosely based on the Java language. Javascript can interact with the displayed text, several of the text-display ares on the screen, as well as fill-in FORMS. If you've ever seen a fill-in form that seems to auto-tabulate numbers, or have notices a scrolling marquee appear in the status-line at the bottom of your netscape window, then you are seeing a javascript in action.
Internet Explorer 3 and greater also support JavaScript, although they support a slightly different version of the language, which they call Jscript. The result is that some Java/Jscript programs work on IE 3/4 and not on Netscape 3/4, and vice versa. Moreover, scripts that work on IE 4 may not work on IE 3, as the script languages are evolving rapidly, and add many new features from version to version.
Internet Explorer also supports a second scripting language, known as VBScript, or Visual Basic Scripting. This language is similar to the Visual Basic languages familiar to many Windows developers, and provides essentially the same features as JavaScript.
As of version 4 of the browsers, Netscape and Microsoft let the script program dynamically interact with the HTML document that is displayed on the page. This is known as dynamic HTML, and makes page design much more interesteing. However -- and unfortunately -- Microsoft and Netscape have done this in completely different ways, such that dynamic HTML scripts written for Internet Explorer 4 will not work with Netscape Navigator 4, and vice versa.
This situation will improve with version 5 of the browsers, as they will both support a common way of writing programs that interact with the document. This common mechanism is known as the Document Object Model or DOM. Both Netscape and Microsoft have promised support for this standard, which will make it much easier to write scripts that work everywhere.
For more information on dynamic HTML and the DOM, please see the following URLS:
NOTE - Don't Get Carried Away! As with all things, you should not get carried away with Javascript -- some simple applications can be extremely annoying to some users. For example, if you fill the status-line at the bottom of the Netscape window by a a scrolling marquee, then the user will never be able to see URLs that are usually displayed there. Needless to say, this can be annoying to users who take advantage of that information to decide which link to select!
ToC ~ Up ~ Prev ~ Next ~ Index |
Introduction to HTML © 1994-1998 by Ian Graham Last Update: 5 January 1998 |