Resizing an iframe height when the contents of the iframe change (same domain)
<p>I've been researching this for a few days and I'm stuck... I read this page:</p>

<p><a href="https://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content">Resizing an iframe based on content</a></p>

<p>and this page:</p>

<p><a href="https://stackoverflow.com/questions/20789198/auto-resize-iframe-height-when-the-height-of-the-iframe-contents-change-same-do">Auto resize iframe height when the height of the iframe contents change (same domain)</a></p>

<p>It seems it's relatively easy to resize an iframe when the maine index.html that contains the iframes first loads, but once the iframe changes content I can't figure out how to re-size the iframe.</p>

<p>my index.html:</p>

<pre><code>&lt;body&gt;
&lt;iframe seamless frameborder="0" name="top" id="top" src="venues.php" width="100%" height="100" /&gt;&lt;/iframe&gt;
&lt;iframe seamless frameborder="0" name="main" id="main" src="admin.php" width="100%" height="2000" /&gt;&lt;/iframe&gt;
</code></pre>

<p></p>

<p>When venues.php loads it's 100px (which is fine) but when somebody clisk in a (internal, same domain) link inside the venues.php page I need to resize the "top" frame height to fit the new contents.</p>

<p>I've tried a bunch of solutions I can always only get it resized on the first load but not when somebody clicks inside it.</p>

<p>Thanks</p>