Last active
August 29, 2015 14:26
-
-
Save walterdavis/ddee3ae7de3a8c6f935a to your computer and use it in GitHub Desktop.
Paste this into the head of a Freeway page to call out from that page to an iframe enclosing it, to adjust that iframe to fit the height of the current page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
window.addEventListener('load', function(evt){ | |
var box = document.getElementById('PageDiv'), h; | |
if (box.hasOwnProperty(outerHeight)){ // old IE | |
h = box.outerHeight; | |
}else{ | |
var style = document.defaultView.getComputedStyle(box, ''); | |
h = style.getPropertyValue("height"); | |
} | |
if(top.resize_iframe) top.resize_iframe( parseInt(h, 10) ); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment