I have a web app which comprises different frames: a menu bar frame, a
search form frame, a result list frame. Depending on the state, only
a subset of these frames is available. (Eg, after login, only the
menu bar frame exists to allow the user to select a search form.
After this, only the menu bar and the search form are visible.)
Now the users are to be able to resize the frames.
WIBNI the webapp could remember the frame sizes across reloads and
frameset changes? For example, if the user resizes the menu bar frame
after login, then it should retain the width even after the user
chooses a search form, and after performing the search.
I have been able to remember the frame width in a cookie by using
JavaScript and onunload events. I have also been able to frob the
frameset definition on load, to replace the default frame widths with
the ones from the cookie. (Actually, the frameset definition is a
JSP, so I can access the cookie from there.)
But I was wondering if there is a generic approach so that I don't
have to write special code for each and every frame. Is there?
I'm also wondering if it is perhaps better to store the frame widths
in the HTTP session, rather than the cookies. (It would be easier to
access the frame widths from JSP in that case.) But it has proven
difficult to store the frame widths in the session from JavaScript, so
I abandoned that approach.
Suggestions appreciated.
Kai
Kai