1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

iframes and links

Discussion in 'Web Design & Development' started by petersruby, Feb 2, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. petersruby

    petersruby Thread Starter

    Joined:
    Jul 17, 2002
    Messages:
    34
    Is there a way to force links in an iframe to open up into the _parent window?

    I have what's almost like an RSS feed being displayed on a page (PageA). This page is dynamically created and displaying headline links.

    I am then iframing PageA into my MainPage.

    So when a user is on my MainPage and they click on the headline links that are showing up in the iframe, the new page loads right there in that iframe area, and NOT into a new window, or a parent window.

    So is it possible, with a script or something similar, to force the links to open up into a new window? Keep in mind that I don't have access to the <a href> tags of the headline links... they are being dynamically placed on PageA.

    Thanks.
     
  2. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    <a href='' target='_parent'>...</a>

    You could also try
    <a href='' target='_top'>...</a>
     
  3. petersruby

    petersruby Thread Starter

    Joined:
    Jul 17, 2002
    Messages:
    34
    Thank you, but I don't have access to the A HREF links. The links are dynamically created on PAGEA. (The page that's being I-Framed into my main page). So that's why I was thinking maybe a script or something. Maybe it's just not possible?
     
  4. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    So you iframe'd a page that isn't your own, like some random page you found on the Internet?
     
  5. Tact

    Tact

    Joined:
    Sep 8, 2002
    Messages:
    506
    oh. i didn't know rss type stuff was like that. that does seem tough.

    similar to how thumbnail galleries could be created using php instead of regular html. the php would have the power to allow people to organize any lists according to date, size, this and that. (something i can't imagine doing the old fashioned way with html so i assume its php or something else)

    so then. whatever it is that makes these links, can't be edited directly is what your saying. hmm. is there a way to look at the script/source of whatever is generating the links? perhaps it's somewhere in there.
     
  6. petersruby

    petersruby Thread Starter

    Joined:
    Jul 17, 2002
    Messages:
    34
    The page is my own, but it's dynamically created using RSS, like Tact posted above. The links just appear there, based on server side code. So, I will try to play around with the code on that end (which is ASP/VB). I just thought maybe there was a CSS attribute or a JavaScript that I could place on the page that would force it.
     
  7. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    Well if the page is yours, then you should have access to do what I said above.

    There has to be something in the ASP script to generate links. So if you add a couple of pieces of additional script that injects target="_parent" into the anchors, it should help :)
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/540549

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice