How to make height auto in iframe using javascript







How to make height auto in iframe using javascript? Here is the code:-

<script type="text/javascript">
  function loadiframe() {
      var iFrameID = document.getElementById('idIframe');
      if(iFrameID) {
            iFrameID.height = "";
            iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
      }   
  }
</script>
<iframe id="idIframe" style="overflow: hidden;" src="#" width="1100" height="150" scrolling="no"></iframe>

Share With Friends

Also Read   How to Hide WordPress upgrade notices using php

Speak Your Mind

*

Time limit is exhausted. Please reload CAPTCHA.