title: How can I set the height for iFrame content for all the browsers?
body: <p>How can I set the height for iFrame content when content of the iframe is an asp.net site with master page ?</p>
  
  <p>Does anyone know any jQuery plug in ?</p>
  
  <p><em><strong>Update</em></strong>
  This works fine in IE but fails in chrome and firefox</p>
  
  <blockquote>
  <pre><code>    function resizeFrame(f) {
          f.style.height = f.contentWindow.document.body.scrollHeight + "px";
      }
  </code></pre>
  </blockquote>
  
  <p>Calling it on body onload()</p>
  
  <blockquote>
    <p>body onload="resizeFrame(document.getElementById('MainIFrame'))"</p>
  </blockquote>
  
  <p>iframe code</p>
  
  <pre><code>        &lt;iframe id="MainIFrame" class="autoHeight" runat="server" marginwidth="0"    style="margin: auto; " 
                  frameborder="0" width="100%" scrolling="no" &gt;
                  &lt;/iframe&gt;
  </code></pre>