title: JS button pressed and resize iframe
body: <p>When i pressed a button in the iframe, it disappears the tag but doesnt resize the iframe size. when the ajax is done should call the AjustResizeIframeHeight method in the other page
  Any suggestion to do that?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>page with iframe</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
  function resizeIframe(obj) {
   obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
  }
  function AdjustIframeHeight(i) { document.getElementById("form-iframe").style.height = parseInt(i) + "px"; }
  &lt;/script&gt;
  
  &lt;iframe id"form-iframe" width="100%" style="border: none" src="{{ notes }}"  onload='javascript:resizeIframe(this);'&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>content the iframe:</p>
  
  <pre><code>&lt;a href="#" onclick="xpto2(1,{{ n.id }});parentNode.parentNode.removeChild(parentNode)" &gt;Don't show again&lt;/a&gt;
  
  &lt;script&gt;
      function xpto2(status,noteid) {
         var request =  $.ajax({
             ....
         });
          request.done(function() {
             window.parent.AdjustIframeHeight();
          });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Added the <code>window.parent.AdjustIframeHeight()</code> in the ajax function, but it says "unresolved function or method"</p>