I'm using code to bring in pages of various heights but standard widths under a banner/menu. i want them to be displayed without scroll bars beyond standard on side of browser. for the most part i've found code that mostly works, however it does not re-adjust itself down in size after finding a page of larger height, ie the height grows but does not shrink. i'm looking for a way to modify the code so that it either resets height to 0 before fetching the actual height of the loading page or some other method of dynamically alterning the height page not only up but also back down. here is the code i borrowed and used.
//This part was put in the header
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
//this is in the main body. picture above a menu option that uses the below script to load the page into the iframe and then the above caclheight to adjust the height setting. only it just adjusts up, not back down.
<iframe name="the_iframe" onLoad="calcHeight();" scrolling="no" width="730" id="the_iframe" src="you_page.html" frameborder="0" allowtransparency="true"></iframe>
Bookmarks