Forum Moderators: open

Message Too Old, No Replies

autoresize Iframe script works in explorer but not firefox

         

rickymartin

8:17 pm on Jun 25, 2008 (gmt 0)

10+ Year Member



Hey people!

i have this problem which is driving me absolutely nutz. i tried going to this site called webmaster but none of the developers can figure it out.

PROBLEM

i have this autio resizing IFrame script which adjusts to what ever length of the HTM page that is loaded inside it. the problem is that the script works perfectly in explorer but not in firefox.

here is the script located right after the header: <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 :<td height="194" colspan="4" valign="top" bgcolor="#FFFFFF"><iframe name="content" style="border:0px" width=923 onLoad="calcHeight();" src="home.htm" scrolling="NO" frameborder="0" height="0"> </iframe></td>
(the only part below that communicates with the script above is ( onLoad="calcHeight();" )

----------------------------------------------------------------

im thinking the reason is because firefox doesn't understand "onload" i really dont know....thats what i read somewhere on your site. if anyone can give me any help it would be appreciated so much. i thought this would have been a simple problem to fix but im starting to think it might be impossible.

i will thank you in advance for anyone that attempts this!

encyclo

11:32 pm on Jun 25, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Continues here: [webmasterworld.com...]