title: Auto Resize iframe Not Work If Iframe Loaded By OnClick
body: <p>I'm building a site that can only be seen through an iframe. I also added a script that auto resize height can be adjusted.</p>
  
  <p>But loading my blog so the added weight of having to load two pages at once. To cope, I apply the OnClick to load the iframe.</p>
  
  <p>Auto Resize But it turned out to not work.</p>
  
  <p><strong>Load Iframe code:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function okeBos() {
  document.getElementById("iframeControl").innerHTML='&lt;iframe scrolling="no" src="http://name-domain.com" style="border: 0; width: 100%;"&gt;&lt;/iframe&gt;';document.getElementById("starApps").style.display="none";
  };
  &lt;/script&gt;
  
  &lt;div id="iframeControl"&gt;&lt;/div&gt;&lt;div id="starApps"&gt;&lt;span onclick="okeBos()"&gt;Load Iframe&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Do you know how to work the Auto Resize for tricks like this? Please help me, thanks ..</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The following code snippet Resize My</p>
  
  <p>Stored at sites that are loaded:</p>
  
  <pre><code>&lt;script src='http://britha.com/Upload/MyFile/iframeResizer.contentWindow.min.js' type='text/javascript'&gt;&lt;/script&gt;
  &lt;script&gt;
      var iFrameResizer = {
          messageCallback: function(message){
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Stored at the site containing the iframe:</p>
  
  <pre><code>&lt;script src="http://britha.com/Upload/MyFile/iframeResizer.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      iFrameResize({
          log                     : true,
          enablePublicMethods     : true,
          enableInPageLinks       : true,
      });
  &lt;/script&gt;
  </code></pre>