Note! Some versions of Explorer will not support all of the Javascript in these pages. This is especially true of those which use windowing functions.

Morphic Molecules Home Page


 

Table of contents Click this symbol
elsewhere on the
page to come back
to the Table of
Contents.
Link Last Modified Notes NS 4.5 IE 4.01  
Javascript Arrays 26 Jan 96
Netscape Communicator Microsoft Internet Explorer  
Control Arrays Updated 24 Aug 98
Originally written for NS 2.0
Netscape Communicator Microsoft Internet Explorer  
String Arrays Updated 29 July 98
Netscape Communicator Microsoft Internet Explorer BGColor will not load correctly; Windowing will not work.  
Dynamic SQL 11 July 98
Netscape Communicator Microsoft Internet Explorer  
Rounding Numbers 8 Sept 96
Netscape Communicator Microsoft Internet Explorer  
Math and Graphing 12 July 96
Netscape Communicator Microsoft Internet Explorer  
Dynamically Embedding Applets Updated 09 Aug 98 Also contains statistical routines Netscape Communicator Microsoft Internet Explorer  
Javascript Links 29 Aug 96





These pages explore the use of Javascript as implemented in a Netscape environment. They have been written and tested only in the Windows 95 environment.
Javascript is scripting language incorporated into Netscape browsers. A reasonable subset of it is also available for Microsoft Explorer. It is similar to Java but somewhat less difficult to write and implement. Like Java, it is object oriented; form elements respond to events such as ONCLICK and ONCHANGE. Javascript functions can be written between <SCRIPT></SCRIPT> tags and called from page element events. A script in a page header can even write the entire page.


Javascript ArraysJavascript has an array object. This object is now built in but initially it had to be created like any other object. Examine this page to see how to create and use arrays. This page will also explain the rather significant differences between arrays in Javascript 1.2 and prior editions of the language.

TOC


Javascript ArraysLike Visual Basic, Javascript can have control arrays. You may know that radio buttons function as a group and to group them, you give all buttons in the group the same name. What is not obvious from the Javascript documentation is that you can do the same with checkboxes, editboxes, buttons, and any other Javascript control. This page shows you how to configure and use such arrays. This page was originally written for Netscape 2.0x but still works on current 4.x browsers

TOC


Strings
This page demonstrates how a simple array of strings can be used to produce an on the fly window showing several images with only a few lines of code. Look at the code in View Source or download the file and use your favorite editor to look at the HTML.

TOC


SQL Generation
This page is an example of how to process a number of choices made by users into a single SQL statement which could then be submitted to a server from a textarea in a form.

TOC


SQL Generation
This page gives an example of how to round a number. The code is available as a text file. Either copy the function into your own code or save it as rounding.js and include it as the source of a script.

TOC


Math and Graphing
Javascript has a math libray similar to that found in Java. That libray is encapsulated in the Math object. Examine this page to learn how to use the libray and do some graphing on the fly.

TOC


SQL GenerationJava Applets can be embedded within a web page and applets usually have parameters which can be stipulated within '' tags within the applet definition. While Netscape 3.0 aims to make these parameters directly accessible to Javascript, Netscape 2.0 does not. This page uses a technique that will work under Netscape 2.0 or 3.0. The applet is presented in a dynamically written window where the applet parameters are set from a fill in table. The applet also calculates some minimal statistics.

TOC


Dynamic Generation of Javascript While many modern RAD languages like Visual Basic and Delphi can generate components and windows on the fly, none of them can actually write denovo code and execute it on the fly. This technique has its roots in Hypercard, which can do some remarkable things. Hypercard can write code into a field (equivalent to a text area) or variable and then "do" the field or variable; i.e., execute the code in the field. Javascript can do the same thing. Here are two examples. The first just writes the code for an alert box. The second shows you how to open a window on the fly.

TOC


Programming jsChartNew Although Netscape 3.0 allows you to directly manipulate Java applets, you can only do so if the applet contains public variables or methods. Sun's useful little barchart applet contains neither of these. This applet has been rewritten as jsChart, which contains a number of public methods which allow Javascript to manipulate the applet parameters. This page contains the applet and a worksheet to allow you to try out the new methods.

TOC


Links to Other Javascript Sites

Javascript Guide NetscapeNetscapes introduction to Javascript.
Javascript 1.2 Reference NetscapeNetscape's Javascript Handbook for Javascript as it appears in Netscape 3.0 - 4.04
Dynamic HTML NetscapeNetscape's Dynamic HTML Handbook which has a sections on layers constructed with both cascading style sheets and the <LAYER> tag.
Javascript 1.3 Additions NetscapeDescribes Netscape's latest update to Javascript.
Builder.com's Scripting Section Contains all sorts of information on web scripting for both Communicator and Netscape.
A Background Selector in Javascript This page, by Achille Hui, presents all of Netscape's named colors. You can choose them for background, text, and links. The page will let you see what that combination looks like as well as give you the information to write your HTML. This is just about my favorite page, and Achille Hui does Javascript with a sophistication which leaves most of us in the dust.
Client Side Cookies NetscapeNetscape's documentation on client side cookies.
Cookie Functions This priceless file by Bill Dortch gives functions for dealing with Netscape Client Side Cookies. At the moment, cookies are the only way in which you can easily save persistent data.
Danny Goodman's Javascript Pages If you know Hypercard, you know Danny Goodman. Visit the Pages of this celebrated author who has turned his attention to Javascript.
The Javascript Planet Site by Mattias Sjoberg with a wide range of Javascripts for reference.

TOC


This page was last updated on

   
LE FastCounter 


Mail comments about Morphic Molecules pages to everett@txdirect.net



This page has been accessed

times since March 8, 1999.