Dynamically resize IFRAME??
Is it possible to dynamically resize an IFRAME? Meaning, I specify the height
of the IFRAME to 69%. In some cases, the dynamically generated content that
fills the IFRAME happens to be bigger than the height I specify. I would
like to detect the height using a script and then resize it to show all content.
I was hoping clientHeight would give me this but it always gives the fixed
height of the IFRAME. Here is the code. init() is just a test called onLoad().
function init()
{
var clientheight = document.all["compInfoFrame1"].clientHeight;
alert("Height" + clientheight);
}
<!--inside the HTML--->
<IFRAME width="100%" name="compInfoFrame1" id="compInfoFrame1" height="69%"
scrolling="no" frameborder="no"
src = "../asp/compInfoProxy.asp?ticker=IBM.N">
</IFRAME>
Any help?
Many thanks
Ram
Re: Dynamically resize IFRAME??
The article below describes how you can do this. The
catch is that you need to add a Javascript onLoad event
handler to the page you want to frame. In other words,
this won't work if you want to Iframe someone else's
webpage, but it works wonders if you are framing your
own pages...
http://www.faqts.com/knowledge_base/...d/1076/fid/127