title: Change height of iFrame when content changes
body: <p>I've been trying to figure out how to change the size of my iFrame when the content changes within the iFrame. I've figured out how to get the iFrame to adjust to the correct height when the page loads. But I am still unable to figure out how to change the height of the iFrame when the content within changes. </p>
  
  <p>Here is my code.</p>
  
  <pre><code>    &lt;iframe src="http://www.silverbowpmdev.com/rlcodetest2/" style="top:0px;   left:0px; bottom:0px; right:0px; width:100%; height:auto; border:none; margin:0; padding:0; overflow-x:hidden;" scrolling="no" onload="javascript:resizeIframe(this);"&gt;&lt;/iframe&gt;
  
      &lt;script language="javascript" type="text/javascript"&gt;
      function resizeIframe(obj) {
      obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>links to site: <a href="http://www.silverbowpmdev.com/rental-listings-test-2/" rel="nofollow">http://www.silverbowpmdev.com/rental-listings-test-2/</a> </p>