Anyone got a code for an expandable iframe?
Will +rep :]
Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks.

Anyone got a code for an expandable iframe?
Will +rep :]
Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks.
Last edited by Mr.OSH; 18-05-2007 at 07:39 PM.
Code:<script type="text/javascript"> //<![CDATA[ window.onload = function() { var f = document.getElementById("mainframe"); function resize() { var h = ""; var w = ""; if (f.contentDocument) { h = f.contentDocument.documentElement.offsetHeight + 20 + "px"; // can't find anything for Opera and Firefox that works for the width. OffetWidth doesn't work right either.(f.contentDocument.documentElement,"").getPropertyValue("width"); } else if (f.contentWindow) { h = f.contentWindow.document.body.scrollHeight + 5 + "px"; } else { return; } f.setAttribute("height",h); f.parentNode.setAttribute("height",h); } if (window.addEventListener) { f.onload = resize; } else if (f.attachEvent) { f.attachEvent("onload", resize); } else { return; } resize(); } //]]> </script> <iframe name="middle" id="mainframe" src="home.php" width="495PX" frameborder="0" allowtransparency="yes" scrolling="no"></iframe>
Cheers, Adam.
Want to hide these adverts? Register an account for free!