Javascript iFrame size issue
<p>I have this snippet that helps me resizing my iFrame:</p>

<pre><code>&lt;script language="JavaScript"&gt;
&lt;!--
function autoResize(id){
    var newheight;
    var newwidth;

    if(document.getElementById){
        newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
        newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
    }

    document.getElementById(id).height= (newheight) + 30 + "px";
    document.getElementById(id).width= (newwidth) + "px";
}
//--&gt;
&lt;/script&gt;

       &lt;iframe src="/forum" width="100%" height="200px" id="iframe1" marginheight="0" frameborder="0" onLoad="autoResize('iframe1');"&gt;&lt;/iframe&gt;
</code></pre>

<p>It works fine onLoad. But when I browse inside the iFramed website it keeps the same dimension it had when the page loaded. So if the contents inside the iFrame changes, the height won't change at all..</p>

<p>How can I fix this issue? I tried with onmouseover, onclick, onblur, etc.. nothing..</p>

<p>Is there a way to make it resizing the iFrame not onLoad but when the iFrame changes the contents?</p>

<p>Thanks</p>
