?
Solved

I have a frame set farem1, frame2,frame 3

Posted on 2001-06-12
14
Medium Priority
?
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 15 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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
Suggested Courses

800 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