Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize a window with frames

Status
Not open for further replies.

kafkapower

Programmer
Nov 28, 2001
7
PT
Hi !

I would like to resize a window with frames. I did the same thing with a window without frames with this code:

function stretch(y,yfinal)
{
if (document.body.clientHeight < yfinal)
{
theHeight = document.body.clientHeight + y;
window.resizeTo(323,theHeight);
}

if (theHeight < yfinal)
{
str=&quot;stretch(&quot; + y + &quot;,&quot; + yfinal + &quot;)&quot;;
setTimeout(str, 20);
}
}

this code stretches the height of the window, but not in one time, it does it smoothly. How can I do the same thing with frames ?

Filipe Lopes.
 
Just set the frame's dimentions in % (it will be relative to the window). Like this:

<frameset rows=&quot;33%,53%,13%&quot;>
<frame src=&quot;one.html&quot;>
<frame src=&quot;two.html&quot;>
<frame src=&quot;three.html&quot;>
</frameset

This will make them resize when you resize browser window.
You can also set some frames with fixed size and others with relative in the same frameset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top