hi programmers!
My name is Brandon. I have been looking for someone on the web that can help me figure out a problem and stumbled across your site. After reading posts on your site, I found that you seemed to really understand the difference between explorer and firefox.I am a web designer that is in need of some help with this script which works in explorer but not firefox.
i have this awesome script which is so simple but works fantastic. It tells an iframe to load an html page but auto resizes to whatever hieght of the loaded html page.
the problem is that the script works in explorer only and not firefox. i read a big explanation of the difference between firefox and explorer but its way over my head im more of a designer rather than the backend although I do understand some of it. if i give you the code would any of you be able to figure out what needs to be changed in the script so it does work in firefox as well?
here is the script located right after the header:
JavaScript Code:
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('content').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('content').height=
the_height;
}
//-->
</script>
then in the iframe the script is :
(the only part below that communicates with the script above is ( onLoad="calcHeight();" )
I think it may be the onload part that firefox doesn’t understand.
thank you so much for helping me out.
Brandon