Iframe height not adjusting with javascript in newer versions of Internet Explorer
        Posted  
        
            by 
                user1486047
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1486047
        
        
        
        Published on 2012-06-27T15:10:27Z
        Indexed on 
            2012/06/27
            15:15 UTC
        
        
        Read the original article
        Hit count: 273
        
JavaScript
|html
I have an Iframe that links to another html page. The iframe is contained within a div. I found some code that would auto adjust the high depending on the contents of the iframe. This code works fine in firefox and older versions of internet explorer but its not adjusting the height in v7 or later.....
Javascript:
<script type="text/javascript"> 
function changeContent() 
{ 
document.getElementById('right').innerHTML = window.frames['contentFRAME'].document.getElementsByTagName('html')[0].innerHTML; 
} 
</script>
HTML:
<div class="fl" id="right">
    <iframe class="newsFrame" id = "contentFRAME" name = "contentFRAME" src ="news.html" onLoad = "changeContent()"></iframe>
  </div>
Can anyone help.....
© Stack Overflow or respective owner