[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I'm writing JavaScript software to act as the front end for accessing genomic
information.  The main screen layout is divided into frames for menu buttons,
status areas, general output, etc.  Every so often, though, the output from a
calculation may be too big for a frame to handle effectively, so I want to
provide an "expand" button on each of the frames.  Pressing the button will
dispel the frames and have the contents fill the entire Netscape window.
 Pressing the button again should restore the screen to it's previous state.

The first part is easy:

  var frameLocation = this.location.href;
  top.location.href = frameLocation;

does it easily.

The second part is buggy, though.  I try to use history.back() but
unfortunately Netscape doesn't return me to the prior state of the last page;
instead it returns me to the way the page looks on initial access (the frames
within the pages are not static and are extensively modified by CGIs during use
of the program).  (Maddeningly, it shows the prior state for just a moment
before overwriting it with the initial page information.)  Even more
frustrating is the fact that the screen doesn't seem to load correctly; it
looses track of some of the JavaScript functions that are still clearly defined
in the View Source window.

Does anyone out there know a simple way to restore the prior page in it's last
state?  I guess I could store all the relevant information in hidden variables
and pass them to a CGI using frame.location.href= and rebuild the screen from
scratch in this way, but what a pain in the butt!  I could also just open
another window and display the results there, but it's not really the feel I

Any hints?  Thanks!


  d  a  t  a  b  a  s  e  s     a  r  e    i  n    o  u  r   g  e  n  e  s?
  Brian Karlak                 bkarlak@panbio.com          (510) 337-7910 ph
  Manager, SciApps Group      http://www.panbio.com        (510) 522-9394 fx
  P   A   N   G   E   A         S   Y   S   T   E   M   S         I   N   C