Results 1 to 4 of 4

Thread: Iframe in Firefox

  1. #1
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Iframe in Firefox

    Two questions... I'm playing around with using iframes on a page and when testing on my local server (not uploaded yet, so no link) they appear OK in IE8 IE7 & Chrome but not in Firefox, why is that?

    And reading some of the other threads, it's mentioned that iframes cannot display pages from other sites yet mine appear to be able to. Why?

    here's my code...

    Code:
    <iframe id="bbc" scrolling="no" marginwidth="0" frameborder="0" marginheight="0" src="http://www.bbc.co.uk/news/" width="780" height="400"></iframe>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I copied your iframe code to a page and viewed it in Firefox. Worked fine here. Perhaps you have iframe support turned off in your copy of Firefox. I'm pretty sure this can be done, but also sure that if it can, it is not a simple configuration toggle. It is also possible that code around the iframe or elsewhere on your test page is poorly enough written that Firefox just doesn't 'see' the iframe, while other browsers mange to error correct for your code.

    To answer your other question, there is no issue with showing other sites in an iframe per se. You cannot cross script between the top page on one domain and a page in an iframe on another domain though (at least not without certs). Also if the page from another site you wish to place in your iframe has code on it to 'break out of frames', there is nothing you can do to stop it. Well, of course, if it is javascript code, you can turn off your local javascript, but this will have no effect on others viewing your page. And, though I'm not certain, I believe there may aslo be server side methods for 'breaking out of frames'. If so, there is nothing that can be done about that. One may always (if legal) copy the other page's content and make one's own page for it, then you can do whatever you like with your copy if it is hosted on your domain.

    In any case, iframes are being deprecated - which means that support is not standardized, and could (probably will) be completely absent in some future versions of browsers, though that time is not likely to be very soon.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default

    Thanks jscheuer1

    Your answer to my 2nd question was most informative.

    I'm still confused with my first issue. On my page I have 7 different iframes, some external pages some internal pages, all differing sizes and Firefox displays them all but not in the correct iframe.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I misunderstood then. When you said:

    they appear OK in IE8 IE7 & Chrome but not in Firefox
    I took that to mean that they didn't show up at all in Firefox. If they are showing up, but with the 'wrong pages', there may be something in your layout (the flow of the page) that reorganizes where each iframe appears. In other words, the pages are in the right iframes, its just that the iframes are not being displayed in the order you anticipate.

    Or, if you are merely refreshing the page in Firefox, as opposed to navigating to it anew each time, changes to the src attribute of iframes may not take affect. Firefox will remember what was loaded into each iframe, and upon refresh, may recall this rather than use a new or existing src attribute.

    To be of any real help here though, I would need to see the page in action.

    If as you say, it isn't live yet - you could always upload a demo somewhere and post a link to it here so I can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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