title: How to dynamically resize an iFrame with pages of different heights?
body: <p>I am using this code to dynamically resize an iFrame depending on the content of the remote site:</p>
  
  <p><a href="http://solidgone.org/Set-IFRAME-height-based-on-size-of-remotely-loaded-content" rel="nofollow">http://solidgone.org/Set-IFRAME-height-based-on-size-of-remotely-loaded-content</a></p>
  
  <p>However, on that remote site, there are other pages as well. What happens is that when I click on a link on the remote site (inside the iFrame), the height doesn't change accordingly. Instead it uses the height of the page that we initially set on the iFrame. In this case it uses the height of remote.php (which is quite tall):</p>
  
  <pre><code>&lt;iframe id='local-iframe' width='1' height='1' frameborder='0' scrolling='no' src ='http://remotesite.com/remote.php'&gt;&lt;/iframe&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>Another thing is that, even if I indicated scrolling='no' on the iFrame, once I clicked a link on inside the iFrame, the scroll bars re-appear.</p>
  
  <p>Is there any solution to this problem? What are we doing wrong?</p>