View Single Post
Old 05-30-2011, 02:05 PM   PM User | #6
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Maybe
Code:
<iframe id="content" name="content" src="content.asp" width="80%" frameborder="0" marginheight="0" marginwidth="0"></iframe>
<script type="text/javascript">
function resizeIframe() {
var height = document.documentElement.clientHeight;
if ( this.offsetTop )
    height -= this.offsetTop;

// not sure how to get this dynamically
height -= 20; /* whatever you set your body bottom margin/padding to be */

this.style.height = height;

};
document.getElementById('content').onload = resizeIframe;
document.getElementById('left_page').onload = resizeIframe;
document.getElementById('right_page').onload = resizeIframe;
window.onresize = resizeIframe;
this should refer to the element that triggered the event, I believe.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
huss80 (05-30-2011)