InfoQuest Knowledgebase InfoQuest Knowledgebase

  • Home
  • Knowledgebase
    • Billing
    • Control Panel
    • Data Center
    • Databases
    • Domains
    • Email
    • FTP
    • Hosted Exchange
    • SSL Certificates
    • Virtual Private Servers
    • Webmail
    • Website Hosting
  • FAQ
  • Contact
  • Visit InfoQuest.com
Home / Website Hosting / iframe Dynamic Height Script

iframe Dynamic Height Script

After the IFRAME is loaded, you can then change the height by doing the following:

<script type=”text/javascript”>
function iframeLoaded() {
var iFrameID = document.getElementById(‘idIframe’);
if(iFrameID) {
// here you can make the height, I delete it first, then I make it again
iFrameID.height = “”;
iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + “px”;
}
}
</script>

Then, on the IFRAME tag, you hook up the handler like this:

<iframe id=”idIframe” onload=”iframeLoaded()” …

Website Hosting

Related Articles

  • Professional Services
  • Where do I go to leave positive feedback for support?
  • Improving Website Performance
  • Remove Post Category from WordPress Widgets

Knowledgebase Categories

  • 7Billing
  • 50Control Panel
  • 4Data Center
  • 4Databases
  • 12Domains
  • 58Email
  • 4FTP
  • 38Hosted Exchange
  • 7SSL Certificates
  • 25Virtual Private Servers
  • 5Webmail
  • 47Website Hosting

Most Helpful Articles

  • How to change WordPress siteURL to IP address using phpmyadmin (POA)
  • Remove index.php from WordPress URL (POA)
  • How To Setup An Archive Folder in Outlook for MAC (POA)
  • How to Redirect a Registered Domain (POA)
  • Share Exchange Outlook calendar on iOS devices (POA)
  • Changing the WordPress URL Path to web root “/” or another path (POA)
  • Where do I go to leave positive feedback for support?
Copyright © 2020 - InfoQuest Technologies, Inc.