Welcome guest, is this your first visit? Create Account now to join.
Results 1 to 4 of 4

This is a discussion on href targets iframe within the Bugs and Vulnerabilities section, part of the Google Chrome category: Hi there, Making a website. CSS menu items target an iframe using href. Works fine in IE, FF and Opera. ...


  1. #1
    bigG is offline Junior Member
    Join Date
    Dec 2009
    Posts
    2

    Question href targets iframe

    Hi there,

    Making a website. CSS menu items target an iframe using href. Works fine in IE, FF and Opera. Not in Chrome however, content is displayed in a new tab, rather than the iframe. This happened just overnight so to speak: one day is works, next day it doesn't. As Chrome always seems to be up to date (4.0.266.0) it could be that a new version has been installed, i'm not sure. Checked options to find whether i accidentally set links to be opened in new tabs always. This is not so (as far as I can tell). Anyone any idea what's going on?

    Oh, by the way: used the element inspector to check whether iframe id and target match. They do (must do as other browsers execute it correctly). Validated html and css on W3. Passed except for the behaviour:csshover3.htc and allowTransparency="true", required to get around some IE quirks.

    Can't think of anything else. Help appreciated.

    here's the code:
    in php include file:
    <li class="li_nc"><a href="home.html" target="pagina" >Home</a></li>

    in index.php body:
    <iframe id= "pagina" name="pagina" frameborder="0" width="100%" allowTransparency="true" style="background-color:transparent" </iframe>

    bigG.

  2. #2
    bigG is offline Junior Member
    Join Date
    Dec 2009
    Posts
    2

    Default

    In addition to the above: it works for IE7, but not for IE8.

    Additionally I included a BASE statement including both the href and target in the head, but this dit not change a thing.

    bigG

  3. #3
    gman413 is offline Junior Member
    Join Date
    May 2011
    Posts
    2

    Default First link shows in iframe, next ones do not

    I have the same or a similar problem. I have a list of links on a page. All are targeted to the same iframe. The first link I click (can be any one from my list) correctly renders in the iframe. Subsequent links I select from my list result in opening/rendering in a new tab.

    The code seems to work fine in FF, IE8, Opera.

    Did you ever get a resolution on this?

    Thanks in advance

    Gman

  4. #4
    gman413 is offline Junior Member
    Join Date
    May 2011
    Posts
    2

    Default

    Quote Originally Posted by gman413 View Post
    I have the same or a similar problem. I have a list of links on a page. All are targeted to the same iframe. The first link I click (can be any one from my list) correctly renders in the iframe. Subsequent links I select from my list result in opening/rendering in a new tab.

    The code seems to work fine in FF, IE8, Opera.

    Did you ever get a resolution on this?

    Thanks in advance

    Gman
    A bit more narrative/background on my experience with this issue:

    I have a webpage, lets call it Page_A containing an iframe. The iframe is the target for a set of links. The URL in each of the links is the same page, let's call it Page_B, from same site/domain but with a different parameter (parameter is the filename of a graphic). Everything appears to work fine with FF, IE8 & Opera. In Chrome however, not so much...the first link clicked shows the Page_B with correct parameter (image) in Page_A's iframe. Subsequent links on Page_A clicked that are targeted to that iframe end up opening a new tab in Chrome.


    Now, what I found though I can't name the root cause...

    Apparently the issue has something to do with trying to pass the parameter in the URL
    From each of the links in my list, I removed the href="... which contained URL?paramName target="frameName" and used paramName as the argument to a function already being called "onclick()" to set a 5 second timer.

    In that function, I now do: frames[0].location=("Page_B?" + paramName);
    and this seems to work in all browsers I've tried (FF, IE8, Opera, Chrome, Avant)

    Best,

    Gman
    Last edited by gman413; 05-09-2011 at 02:18 PM.

Similar Threads

  1. To access iframe contentwindow
    By tangore in forum Plugins Development
    Replies: 1
    Last Post: 12-03-2009, 06:46 PM

Posting Permissions

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