Basic HTML version of Foils prepared 23 June 1997

Foil 52 Use of Dummy Frames in JavaScript

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo


1 <HEAD><SCRIPT>...</SCRIPT></HEAD>
2 <BODY>
3 Various actions that load a new URL into page
4 </BODY>
5 will result in the loss of all JavaScript methods and properties!
6 This can be avoided by using dummy frames:
7 <HEAD><SCRIPT>...</SCRIPT></HEAD>
8 <FRAMESET ROWS="1,*">
9 <FRAME NAME="DUMMY">
10 <FRAME NAME="ActualFrame"
  • SRC="Thiscontainsoldbodyhtml.html">
11 </FRAMESET>
12 Now use <a href="URL" target="ActualFrame"> so that reloading will NOT destroy your JavaScript!
13 Note we defined a dummy frame above ActualFrame that occupies one pixel (could use zero!). The * notation tells Netscape to assign the remaining rows to the second frame

in Table To:


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 Apr 1 1998