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

Foil 51 Another Important Way of setting a new document to be loaded

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

localframe = displays[currentdisplay].pageframe; // List of labels of frames in frameset
if( (localframe != 'main') && (localframe != 'top') )
top.frames[localframe].location.href = pages[pageused].pageurl;
else top.location = pages[pageused].pageurl;
This code snippet shows an example where an array pages[pageused] (actually a structure with various information) stored in top hold URL's and we directly set location property of frame
location is object holding URL of page in object
location and location.href can be used interchangeably



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