Results 1 to 14 of 14

Thread: Frames [resolved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Resolved 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>
    Last edited by mrstuff68; Jan 27th, 2006 at 10:29 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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>

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    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

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Re: Frames

    Im bouncing this to the top, just to see if anyone has a solution to this.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Frames

    Instead of

    document.getElementById('MyIframe').height= getheight;

    try

    document.getElementById('MyIframe').style.height= getheight;

    That should work in FF too

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Re: Frames

    mendhak, with the new code it works fine in IE but still doesnt work in FF.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Frames

    Can you upload your page here in ZIP format, I'd like to run it on my machine.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    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
    Attached Files Attached Files

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Re: Frames

    Mendhak, Did you get a chance to look at the code that I posted? Do you have any suggestions concerning a fix.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    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.

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Re: Frames

    Mind I remind you that it works fine in opera and in IE. It just doesnt want to resize in Firefox.

  12. #12
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Frames

    Heavens man, that is some terrifying code

    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?

  13. #13
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Frames

    Sorry I missed this thread. I can't determine the problem though.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width