Frame Creation & Recreation

My application is a fairly typical menu-driven web application.  I am using framesets and frames, with a horizontal title page, and the menu in a left column frame.  The largest frame is my "work frame" and is where most option work occurs.  My question focuses on this work frame.

As stated above, most options use the work frame as created when the web application is initialized.  However, for one option I need to divide the work frame into two frames.  Then, when I go back to other options, I need the work frame reset to just one frame.

Is this possible?
What technique do I use to create two frames within the work frame?
What technique do I use to create one frame in the work frame instead of two?
Who is Participating?
knightEknightConnect With a Mentor Commented:
in general, you would change the src file of the text frame from "welcome.htm" to a new file, say we call it "textFrames.htm" when this option is chosen.
I assume the option is chosen from the menu frame by a link.  If so, do this:

<A href="textFrames.htm" target="text">Option</A>

in the textFrames.htm file you have another frameset:

<FRAMESET  cols="100%" rows="*,48">
  <FRAME name="topText" src="topText.htm">
  <FRAME name="bottomText" src="bottomText.htm">

then when you are ready to leave the option, reset the text frame back to a normal html file:

<A href="welcome.htm" target="text">Welcom</A>

You could make the source file of the work frame another frameset file -- just for the duration of this option.
Show us your frameset code.
or you could use an IFrame in the work frame document.
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

LarryAndroAuthor Commented:
I'm unfamiliar with IFrame, but will read up on it now.  

You said... You could make the source file of the work frame another frameset file -- just for the duration of this option.

This seems to imply that I can reconfigure a frame multiple times, which would be the solution for my problem.  (If so, could you tell me how to reconfigure just the work frame?)

Including my frameset file below, and ignore the floating part.

//FrameCreate....    Originally InvokeScript.js

if ( == 'menu') {
    // Sometimes, Netscape will try to load this index inside the menu frame.  I haven't
    // worked out why but this will detect that situation and reset the location property.
    self.location.href = "menu.htm";
} else {
    //Call to MenuTree.js by initialise changed to code embedded in index.jsp - LJA

    var thePage = pageFromSearch('home.htm', theMenu, true);
    if (floatingMode) {
        self.document.writeln('<frameset cols="100%" rows="*,48" onUnload="unloadFloating();" onResize="defaultResizeHandler();">');
        self.document.writeln('<frame name="menu" src="menu.htm" scrolling="auto" marginwidth="1" marginheight="1" APPLICATION="yes">');
        self.document.writeln('<frame name="menuCntrl" src="menucntrl.htm" scrolling="no" marginwidth="0" marginheight="0" APPLICATION="yes">');
    } else {
        self.document.writeln('<frameset cols="100%" rows="70,*" onResize="defaultResizeHandler();" frameborder="0">');
            self.document.writeln('<frame name="title" src="title.htm" scrolling="no" noresize marginwidth="0" marginheight="0" APPLICATION="yes">');
        self.document.writeln('<frameset cols="250,1,*" rows="100%">');
        self.document.writeln('<frameset cols="100%" rows="*,48">');
            self.document.writeln('<frame name="menu" src="menu.htm" scrolling="auto" marginwidth="5" marginheight="5" APPLICATION="yes">');
            self.document.writeln('<frame name="menuCntrl" src="menucntrl.htm" scrolling="auto" marginwidth="5" marginheight="1" APPLICATION="yes">');
            self.document.writeln('<frame name="hline" src="horizline.htm" scrolling="auto" marginwidth="5" marginheight="1" APPLICATION="yes">');
            self.document.writeln('<frame name="text" src="welcome.htm" scrolling="auto" marginwidth="5" marginheight="1" APPLICATION="yes">');

My work frame is <frame name="text"...>.  This is the frame I want to reconfigure to be two frames later, and reconfigure again back to the above.
I see the following frame names:  title, menu, menuCntrl, hline, text

which of these frames is your "work frame" -- the one you want to split?

LarryAndroAuthor Commented:
My work frame is 'text.'  The frameset and frames above are used when the web app initially opens.  But, if the user selects one of the menus in the menu tree I want to split up the 'text' frame into two frames.  After exiting that option, I want to reframe 'text' from two frames back to the one (original) frame.
this can also be done with javascript if necessary ... syntax:

   top.frames["text"].location = "textFrames.htm";
LarryAndroAuthor Commented:
Sounds like it's as easy as I hoped it would be.  Basically, the FRAMESET/FRAME configures the window that is active at the moment of execution.  When the web app is invoked, the entire screen is the context and so that's what is configured.  But, when I click the link and navigate to my 'text' frame, that becomes my environment, and so any FRAMESET/FRAME issued will section up 'text.'

Do I understand so far?  What I don't understand is the exit action where I would collapse my two frames into one frame.  What I think you're implying is the following...

* 'text' frame created initially.
* 'text' frame area reframed into two frames...  'topText' and 'bottomText'
* 'text' frame not destroyed by creation of other two frames, even though 'text' geographical area is "overwritten"
   by two new frames.  So, 'text' frame still available for use.

Are you saying that the creation of 'topText' and 'bottomText' is not destructive of 'text'?

(Increasing points...)
>> Are you saying that the creation of 'topText' and 'bottomText' is not destructive of 'text'?

yes, everything you said is correct.  If the page loaded into the "text" frame has itself a set of frames, then those frames will be displayed inside the "text" frame.  To "un-do" this effect, simply reload the "text" frame with a normal HTML file.   The mechanics of how to do all this depend on your specific application -- e.g. how you switch "options" in the "text" frame now.
LarryAndroAuthor Commented:
More than cool!  Thanks...
I hope it helps!  Thanks for the A!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.