HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 28 User Defined Objects Continued

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * See also color IMAGE

You can access object properties in a natural fashion such as:
var actualselected = worldmenu.menuselection;
familymenu.color = 'red';
Curiously you can also use in Netscape 2 an array like notation to which we will return:
familymenu[0] is same as familymenu.no
familymenu[1] is same as familymenu.name etc.
We will return to this when we discuss arrays
One can associate methods with user objects but with a syntax that appears very limiting as object methods have identical arguments to function
General Syntax is:
Objectname.methodname = functionname;
where Objectname is an existing Object and functionname is an existing function -- it can be used to set event handlers with no arguments!



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Feb 19 1997