Solved

I have a frame set farem1, frame2,frame 3

Posted on 2001-06-12
14
232 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:nesifa
14 Comments
 
LVL 8

Expert Comment

by:bebonham
ID: 6183076
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
0
 
LVL 1

Expert Comment

by:kllewelyn
ID: 6183084
Is the content of the frames static? Give me an understanding of the overall project.

Thanks
0
 

Author Comment

by:nesifa
ID: 6183099
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
0
 

Author Comment

by:nesifa
ID: 6183200
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
0
 
LVL 1

Accepted Solution

by:
kllewelyn earned 5 total points
ID: 6183302
OK, I have 3 frames, 1 frame controls the other 2. Let me know if this is close to what you are looking for.

Save this as frames.html:
<html>
  <head><title>Hide 1 show the other</title>
  </head>
  <frameset framespacing='0' frameborder='1' cols='33%,33%,34%'>
    <frame src='hidden.html' frame name='frame1'>
    <frame src='hidden.html' frame name='frame2'>
    <frame src='choose.html' frame name='frame3'>
  </frameset>
</html>

Save this as choose.html:
<html>
<body>
<script type="text/javascript">
  function showFrame(x)
  {
    eval("parent.frame"+x+".location.href='visable.html'");
  }
  function hideFrame(x)
  {
    eval("parent.frame"+x+".location.href='hidden.html'");
  }
</script>
<input type="button" value="Frame1" onclick="showFrame(1);hideFrame(2)">
<input type="button" value="Frame2" onclick="showFrame(2);hideFrame(1)">
</body>
</html>

Save this as visable.html:
<html>
<body>
You can see me!
</body>
</html>

Save this as hidden.html:
<html>
<body>
</body>
</html>

Place all of these in the same directory and browse to frames.html. When you click on the button frame1, frame1 will show the visable page and frame2 will show the blank page(hidden) if you want to actually hide the contents of the frame and not replace the href then you need to use iframes or div areas within the frames.

Let me know.




0
 

Author Comment

by:nesifa
ID: 6183416
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
0
 
LVL 1

Expert Comment

by:kllewelyn
ID: 6183482
OK, so you should be able to just change the href for the frame with the desired ocx page.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:kllewelyn
ID: 6183644
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.

0
 
LVL 1

Expert Comment

by:kllewelyn
ID: 6183657
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.

0
 
LVL 1

Expert Comment

by:kllewelyn
ID: 6183662
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>

0
 
LVL 19

Expert Comment

by:webwoman
ID: 6185819
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.
0
 

Author Comment

by:nesifa
ID: 6187276
yes, but I did it my self by changing top.document.body.cols="25,0,250"
0
 
LVL 1

Expert Comment

by:kllewelyn
ID: 6187295
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.
0
 

Author Comment

by:nesifa
ID: 6190908
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
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now