-
Frames [resolved]
I have the following code on my page. I have a frame defined in a table and for some reason when the text shows up it doesnt span the entire page, but there is scrolling, I dont want no scrolling on it, i just want the entire page to show up .
HTML Code:
<td valign="top" align="center" width="100%">
<Table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<Tr>
<Td height="100%">
<iframe name="main_frame" src="Home.html" width="100%" height="100%" marginwidth="5" marginheight="5" scrolling="no" frameborder="0">
</iframe>
</TD>
</TR>
</TABLE>
</td>
-
Re: Frames
In the IFRAME's onLoad, do this:
HTML Code:
<script language="JavaScript">
function ResizeIframe(){
var getheight = document.getElementById('MyIframe').contentWindow.document.body.scrollHeight;
document.getElementById('MyIframe').height= getheight;
}
</script>
<iframe name="MyIframe" id="MyIframe" src="Home.html" width="100%" height="100%" marginwidth="5" marginheight="5" scrolling="no" frameborder="0" onLoad="ResizeIframe();">
</iframe>
-
Re: Frames
Mendak, the code that you provided me works fine in IE but not in firefox. It loads correctly but when I click on another link to load in that frame, if the next loading page is bigger it changes correctly but when its smaller, it leave the previous height of the frame.
Any ideas on this
-
Re: Frames
Im bouncing this to the top, just to see if anyone has a solution to this.
-
Re: Frames
Instead of
document.getElementById('MyIframe').height= getheight;
try
document.getElementById('MyIframe').style.height= getheight;
That should work in FF too
-
Re: Frames
mendhak, with the new code it works fine in IE but still doesnt work in FF.
-
Re: Frames
Can you upload your page here in ZIP format, I'd like to run it on my machine.
-
1 Attachment(s)
Re: Frames
Mendhak,
Attached is the site and a few links. Open the index.html in Firefox, you will see Welcome to our site in the frame. then click on calculators on the left hand side, you will see that Fitness Calculators heading is not at the top like Welcome but lower. This is the issue that i am talking about in this post. Also when you load the page let me know if you style sheet kicks in the the headings are in a thick font or are they time new roman.
Thanks
-
Re: Frames
Mendhak, Did you get a chance to look at the code that I posted? Do you have any suggestions concerning a fix.
-
Re: Frames
Does anyone have any ideas on how I can resolve this issue that I am having. Files are attached in a previous posting.
-
Re: Frames
Mind I remind you that it works fine in opera and in IE. It just doesnt want to resize in Firefox.
-
Re: Frames
Heavens man, that is some terrifying code :eek2:
You should never need to nest tables like that. Use them sparingly, and certainly not for layout.
For me, it seems to work OK, but I'm not sure what you're trying to do, so can you explain the purpose of it a little more?
-
Re: Frames
Sorry I missed this thread. I can't determine the problem though.
-
Re: Frames
I managed to track down the problem, i was missing <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> on the page.