Link to home
Start Free TrialLog in
Avatar of nesifa
nesifa

asked on

I have a frame set farem1, frame2,frame 3

when frame one is visible, frame 2 is hidden and vice virce. The size should be the same. How can i do it
I have not many point available.

Thank you
Avatar of bebonham
bebonham

what do you mean hidden...

how many frames are visible at a time, and how much space of the screen do they take up.

Bob
Is the content of the frames static? Give me an understanding of the overall project.

Thanks
Avatar of nesifa

ASKER

two frames are visible at a time.

<frameset border=0 cols="100%,*">
     <frame name="1" src="1.htm">
        <frame name="2" src="2.htm">
        <frane name="3" scr="3.htm">
</frameset>
I want frame 1 and 2 to take the smae space(amount and position the smae"
based in what I click frame 1 is visible and then frame 2 is hidden.

Thank you
Avatar of nesifa

ASKER

two frames are visible at a time.

<frameset border=0 cols="100%,*">
     <frame name="1" src="1.htm">
        <frame name="2" src="2.htm">
        <frane name="3" scr="3.htm">
</frameset>
I want frame 1 and 2 to take the smae space(amount and position the smae"
based in what I click frame 1 is visible and then frame 2 is hidden.

Thank you
ASKER CERTIFIED SOLUTION
Avatar of kllewelyn
kllewelyn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nesifa

ASKER

hi klevellin,
It looks okay so far.
visable and hidden frames I want to take up the same space, the same absolut position.
I do not want to have div tags in the same frame. The design requires both of frames be loaded on the same position, while one is visible the other one is hidden. I load two OCXs. OCx on one frame remains always the same, ocx in the other frame is variable. That is the reason that I do not use div tags, because of not loading more than two ocx at a time in the memory.

Thank you
OK, so you should be able to just change the href for the frame with the desired ocx page.
How about this?

save as frames.html:
<html>
  <head><title>Hide 1 show the other</title>
  </head>
  <frameset framespacing='0' frameborder='1' cols='50%,50%'>
    <frame src='choose.html' frame name='mainFrame'>
    <frame src='hidden.html' frame name='ocxFrame'>
  </frameset>
</html>

Save as choose.html:
<html>
  <head><title>Hide 1 show the other</title>
  </head>
  <frameset framespacing='0' frameborder='1' cols='50%,50%'>
    <frame src='choose.html' frame name='mainFrame'>
    <frame src='hidden.html' frame name='ocxFrame'>
  </frameset>
</html>

save as ocx1.html:
<html>
<body>
I am OCX #1
</body>
</html>

save as ocx2.html:
<html>
<body>
I am OCX #2
</body>
</html>

This allows only 2 ocx's to be in memory at the same time. the page you load into frame 1 and the variable 1 that gets loaded into frame 2, based on the user selection.

Let me know.

How about this?

save as frames.html:
<html>
  <head><title>Hide 1 show the other</title>
  </head>
  <frameset framespacing='0' frameborder='1' cols='50%,50%'>
    <frame src='choose.html' frame name='mainFrame'>
    <frame src='hidden.html' frame name='ocxFrame'>
  </frameset>
</html>

Save as choose.html:
<html>
  <head><title>Hide 1 show the other</title>
  </head>
  <frameset framespacing='0' frameborder='1' cols='50%,50%'>
    <frame src='choose.html' frame name='mainFrame'>
    <frame src='hidden.html' frame name='ocxFrame'>
  </frameset>
</html>

save as ocx1.html:
<html>
<body>
I am OCX #1
</body>
</html>

save as ocx2.html:
<html>
<body>
I am OCX #2
</body>
</html>

This allows only 2 ocx's to be in memory at the same time. the page you load into frame 1 and the variable 1 that gets loaded into frame 2, based on the user selection.

Let me know.

sorry about that, this should be the choose.html file:
<html>
<body>
<script type="text/javascript">
  function changeFrame(x)
  {
    eval("parent.ocxFrame.location.href='ocx"+x+".html'");
  }
</script>
<input type="button" value="OCX1" onclick="changeFrame(1)">
<input type="button" value="OCX2" onclick="changeFrame(2)">
</body>
</html>

you don't 'hide' frames -- you just load another document into them. If you want the content to change, make a link that loads another page. That's what's been proposed, and that's the ONLY way you can change what's shown in a frame.

If, however, you don't want to use frames, but want ONE document with layers that show/hide, that's something ENTIRELY different.
Avatar of nesifa

ASKER

yes, but I did it my self by changing top.document.body.cols="25,0,250"
But you said you only wanted 2 ocxs to be loaded at once. if you simply decrease the size of a frame the ocx is still loaded.
Avatar of nesifa

ASKER

yes, in one frame I keep one OCX forever, the other frame I just change different OCX, in the third frame I have the clicable buttons. If you come with a better Idea, please let me know. Thank you