Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Place this code right above the closing body tag of the parent window. place your iframe resizing code where commented.</p> <p>OLD CODE:</p> <pre><code>&lt;script&gt; var intWinHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight); var resizeIframe = function() { var newWinHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight); if(newWinHeight != intWinHeight) { intWinHeight = newWinHeight; // execute your Iframe resizing code here } } setInterval(resizeIframe, 100); &lt;/script&gt; </code></pre> <p>NEW CODE:</p> <pre><code>&lt;script type="text/javascript"&gt; var iFrameId = document.getElementById('myIframe'); var intWinHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight); var intIframHeight = (typeof iFrameId.contentWindow.window.innerHeight != 'undefined' ? iFrameId.contentWindow.window.innerHeight : iFrameId.contentWindow.document.body.offsetHeight); function exeResizeIframe() { var newWinHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight); var newIframHeight = (typeof iFrameId.contentWindow.window.innerHeight != 'undefined' ? iFrameId.contentWindow.window.innerHeight : iFrameId.contentWindow.document.body.offsetHeight); if((newWinHeight != intWinHeight) || intIframHeight != newIframHeight) { intWinHeight = newWinHeight; intIframHeight = newIframHeight; // execute your Iframe resizing code here } } setInterval("exeResizeIframe()", 100); &lt;/script&gt; </code></pre> <p>Please note, change the iframe ID due to security restrictions in IE &lt; 9 only local paths will work in the ifram src</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload