SawnDiddle
07-13-2006, 02:25 AM
Ok, so I have the following script that resizes an iframe based on the content. The problem is that I only have it for IE. Can someone tell me how to get this to work in Firefox too?
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('main_div').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('main_div').height=
the_height;
}
//-->
</script>
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('main_div').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('main_div').height=
the_height;
}
//-->
</script>