How to Make an iFrame Resize
- 1). Log in to your Web server and enter your username and password. Click the HTML file on which you want to include the iframe to open it.
- 2). Click your cursor in between the <head> and </head> tags.
- 3). Insert this code:
<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;
}
//-->
</script> - 4). Click your cursor in the section of the page where you want to insert the iframe. This must be somewhere between the <body> and <body> tags.
- 5). Insert this code:
<iframe
onLoad="calcHeight();"
src="http://www.otherpage.com"
scrolling="NO"
frameborder="1"
height="1">
</iframe> - 6). Replace "http://www.otherpage.com" with the actual URL of the page you want to include in the iframe.
- 7). Publish the page.
Source...