HELP! * GREY=local LOCAL HTML version of Foils prepared 26 February 1996

Foil 16 Creation of JavaScript Objects

From CPS616 Lectures on JavaScript CPS616 Basic Information Track for Computational Science -- Winter-Spring Semester 96. by Geoffrey C. Fox * See also color IMAGE

You define the Class template (to use a Java lingo) with a function definition
Then create an instance of the object with the new statement
function Display(no) {
this.displayno = no; // Label display instance
this.pageframe = 'foil'; // Default for name of frame to put page in
this.indexframe= 'list'; // Default for name of frame to be index in
this.pagepointer = null; // Default URL for page to use
this.indexpointer = null; // Default URL for index to use
}
cps616 = new Display(1); // create an object cps616
cps616.pagepointer = "../cps616over96/webfoilindex.html";
cps616.indexpointer = "../cps616over96/foillist.html";



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 Tue Feb 18 1997