Iframe height issue in firefox
<p>I loading one aspx page in iframe in asp.net.
I'm dynamically setting the height for iframe based on the content height of iframe.
its working well for IE8,
but in firefox.
every time its giving wrong height.
even though content is less its giving more.</p>

<p>here is my code</p>

<pre><code>function resizeFrame() {
                if (isMax == false) {
                    var frame = window.frameElement;
                    if (navigator.appName == "Microsoft Internet Explorer") {
                        var currentheight = 0;
                        frame.style.height = frame.contentDocument.body.offsetHeight + 50 + 'px';
                        currentheight = parseInt(frame.contentDocument.body.offsetHeight);
                        if (currentheight &lt; 800) {
                            frame.style.height = "110%";
                        }
                    }
                    else {
                        frame.style.height = frame.contentWindow.document.body.scrollHeight;                                          
                    }
                    createCookie("Frameheight", frame.style.height, 1);
                }
            }   
</code></pre>

<p>if I check seperately(without assigning to frame.style.height) frame.contentWindow.document.body.scrollHeight is giving correct height.
But if I assign to the frame.style.height ,second time onwards its giving wrong height(increment in heght even content is less than prevoius time).
pls help me how to solve asap.</p>
