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().
var clientheight = document.all["compInfoFrame1"].clientHeight;
alert("Height" + clientheight);
<!--inside the HTML--->
<IFRAME width="100%" name="compInfoFrame1" id="compInfoFrame1" height="69%"
src = "../asp/compInfoProxy.asp?ticker=IBM.N">
Re: Dynamically resize IFRAME??
The article below describes how you can do this. The
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
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center