Hello All,
I’m really having a running issue with this code. The reason I went with iframe is because of my flash header, I can’t have it reloading with every page. This iFrame resizing code works in IE and Chrome, but not in Firefox or Opera. The purpose of this piece of code is to make the frame length exact every time.
Can someone please tell me why?
<script type=”text/javascript”>
<!–
function resize_iframe(){
document.getElementById(“main”).height=100
document.getElementById(‘main’).height=window.frames[“main”].document.body.scrollHeight
}
// –>
</script>
<iframe id=”main” name=”main” src=”main.html” frameborder=”0″ scrolling=”no” width=”918″ height=”400″ marginwidth=”0″ marginheight=”0″ allowtransparency=”true” onload=resize_iframe();>
</iframe>
The site is halcyon-hotsprings.com if anyone would care to have a look at it in action.
If anyone has a better solution than the iFrame I would be interested to hear.
Thanks so much!