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

Foil 52 Use of Dummy Frames in JavaScript

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

<HEAD> Bunch of JavaScript</HEAD>
<BODY>
Sundry actions that load a new URL into page
</BODY>
will result in loss of all JavaScript methods and properties as you load new page! This can be avoided by using dummy frames as below
<HEAD> Bunch of JavaScript</HEAD>
<FRAMESET ROWS="1,*" >
<FRAME NAME="DUMMY" >
<FRAME NAME="ActualFrame" SRC="Thiscontainsoldbodyhtml.html" >
</FRAMESET>
Now use target="ActualFrame" in <a href="URL"> and reloading ActualFrame will NOT destroy your JavaScript!
Note we defined a dummy frame which occupied one pixel (could use zero!) above ActualFrame
The * notation tells Netscape to assign the remaining rows to second frame



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