Overide "target=_top" in non-hosted iframe

Discussion in 'JavaScript' started by paulpedersen, Feb 22, 2008.

  1. #1
    A page on my site has an iframe page that is hosted on another site (yes i have permission).

    The links in the iframe are hard coded "target=_top".

    How can I use JavaScript to override this with "target=_blank"?
     
    paulpedersen, Feb 22, 2008 IP
  2. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can't alter or do anything with websites in iframe if they're not on the same domain. Security reasons.. same with not being able to open pages not on the same domain with AJAX.

    If you have permission from the person, should get them to change the target of the links :\
     
    zerxer, Feb 22, 2008 IP
  3. paulpedersen

    paulpedersen Peon

    Messages:
    36
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    They won't do that because it's used by thousands and the target is set to "_top" so that links won't load in the iframe.
     
    paulpedersen, Feb 23, 2008 IP