20 Oct, 2008, Zenn wrote in the 1st comment:
Votes: 0
I'm using this script on this site to attempt to get the iframe to automatically resize for various browsers/screen resolutions, etc. It doesn't seem to work like I'm wanting it to. What do I need to do to get it to expand to the size of the page inside it?

<script type="text/javascript">
function autoIframe(frameId){
try{
frame = document.getElementById(frameId);
innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
objToResize = (frame.style) ? frame.style : frame;
objToResize.height = innerDoc.body.scrollHeight + 10;
}
catch(err){
window.status = err.message;
}
}
</script>


<iframe id="forums" name="forums" src="forums/index.php" onload="if (window.parent && window.parent.autoIframe) {window.parent.autoIframe('forums');}"></iframe>
02 Feb, 2009, Rojan QDel wrote in the 2nd comment:
Votes: 0
Just set the width and height options in the iframe tag to what you want them to be (800x600 or perhaps 100%)
0.0/2