iframe question

Discussion in 'HTML & Website Design' started by iShopHQ, Feb 20, 2006.

  1. #1
    I'm loading an external site into an iframe

    When someone clicks a link INSIDE the iframe, I wan to load the resulting page over top of everything.

    Anyone know how to do that? I've been searching an hour with no luck....
     
    iShopHQ, Feb 20, 2006 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    If the links on the page inside the iframe have a target="_blank" tag then they should open a new window. Otherwise I cant think of any way to do it.
     
    jestep, Feb 20, 2006 IP
  3. AMysticWeb

    AMysticWeb Guest

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    New window makes the most sense to me as well.
     
    AMysticWeb, Feb 20, 2006 IP
  4. iShopHQ

    iShopHQ Peon

    Messages:
    644
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The iframe is loading a page I don't own, so I don't have control over the links on it.

    I went with a solution much like Google image search: a button that closes the top frame adn reload the page. Problem is (samme issue with google) if you browse around in the irframe, then click the close button, it reloads the first page, not the page you might have browsed to.
     
    iShopHQ, Feb 21, 2006 IP
  5. toby

    toby Notable Member

    Messages:
    6,923
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    285
    #5
    try target="_parent"
     
    toby, Feb 21, 2006 IP
  6. iShopHQ

    iShopHQ Peon

    Messages:
    644
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi toby

    Thanks for the suggestion. I don't have access to change the links in the page being loaded into the iframe - it's coming from a different site, just like in Google search.

    I found plenty of javascript that can pull information out of an iframe as long as the content in the iframe and the main page come from the same server. But from everything I've read, if you are showing a remote page in teh iframe, there's no way to get information on events happening within the iframe.
     
    iShopHQ, Feb 21, 2006 IP
  7. marty

    marty Peon

    Messages:
    154
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Have you considered having a timer check the location of the IFrame every few seconds and then when it (the location of the IFrame) changes you could set the location of the Parent equal to the location of the IFrame?

    Good luck dude...
     
    marty, Feb 21, 2006 IP
  8. iShopHQ

    iShopHQ Peon

    Messages:
    644
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I think the solution I have is good enough. I'll track traffic to see if it makes any difference.

    You can see what I came up with at:
    http://www.ishophq.com/store/get~prod~AFF0087C-626A-48AA-BE34-E2FB4C3E2742.htm

    Before, when a visitor clicked on a product page, it went there over iShopHQ (left the site). I'll try it with this fameset a while to see if it makes any difference.

    BTW, the Back to Product listings button is a javascript:history.go(-1) so it takes you back to where you came from, which, in this instance, won't be product listings. So if you click it and end up back here, don't think it's broken-
     
    iShopHQ, Feb 21, 2006 IP