Dynamically resize an iframe to match the loaded page size.
The following links load pages of different lengths.
<script type="text/javascript">
<!--
el=document.getElementById(id)
el.style.height="100px" // for Firefox and Opera
setTimeout("el.style.height=el.contentWindow.document.body.scrollHeight+'px'",10) // setTimeout required for Opera
// -->
</script>
<iframe id="sizeframe" name="sizeframe" scrolling="no" frameborder="yes" src="page.htm" onload="resizeIframe(this.id)" style="width:300px;height:100px;border:1px solid black"></iframe>
It appears that Opera would not reduce the size of the iframe without applying a short delay, setting a delay with setTimeout worked ok.