If you are getting angry with you're iframes because they do not expand to the correct size, this is a quick and easy way to get them to expand to the correct height.
Step one:
insert the following code into the head tags:
(replace 'the_iframe with the iframe id.)HTML Code:<script language="JavaScript"> <!-- function calcHeight() { //find the height of the internal page var the_height= document.getElementById('the_iframe').contentWindow. document.body.scrollHeight; //change the height of the iframe document.getElementById('the_iframe').height= the_height; } //--> </script>
Step Two:
Put onload="calcheight()" into you're iframe tags (make sure there is no height specified) and you're done!
__________________________________________________ __________________________________________________ ____________
Easy or what? I hope you enjoyed it, it's used for more 'novice' coders. I just saw a post with someone asking how to do it.





Reply With Quote





