title: Iframe resize, not working
body: <p>I am hosting the site locally on my xampp but, this code should have auto adjust with the site size and view it but here I am not able to resize it nor I am able to view it( I just get a blank white screen in the iframe space) what am I doing wrong, Please suggest me if there is an easier way to it .Here is the code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt; SCRIPT LANGUAGE = javascript &gt;
  
    function reSize() {
      try {
        var oBody = ifrm.document.body;
        var oFrame = document.all("ifrm");
  
        oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight);
        oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth - oBody.clientWidth);
      }
      //An error is raised if the IFrame domain != its container's domain
      catch (e) {
        window.status = 'Error: ' + e.number + '; ' + e.description;
      }
    }
  
  &lt; /SCRIPT&gt;
                   
                 
  &lt;BODY onload=reSize()&gt;
   &lt;iframe onresize=reSize() id=ifrm src="http:/ / www.twitter.com "&gt;&lt;/iframe&gt;
  &lt;/BODY&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p></p>