HELP! * YELLOW=global GREY=local Global HTML version of Foils prepared 21 February 97

Foil 50 Use of Dummy Frames in JavaScript

From Feb 17/19 Delivered Lecture for Course CPS616 -- aJavaScript Language Objects and Frames CPS616 spring 1997 -- Feb 17 and 19 1997. by Geoffrey Fox * Important Information in IMAGE
Secs 93.6
<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 Fri Feb 21 1997