Forum Moderators: open

Message Too Old, No Replies

Making links open inside an iframe

         

emdac

3:17 pm on May 26, 2005 (gmt 0)

10+ Year Member



I'm a novice when it comes to html and/or scripting so please explain clearly and consider me a dummy :)

I'm trying to keep a site like yahoo in an iframe. Everytime I click a link on there, it opens on a full page rather than stay in the frame. I'm sure there's a way of keeping it in the frame but I haven't been able to figure it out even after countless google searches. Any help would be greatly appreciated. And is there a better way to accomplish this using something other than iframes? Thanks.

Lynque

3:42 pm on May 26, 2005 (gmt 0)

10+ Year Member



Hi Emdac,

You have to target the iframe with the links inside it

1.e. <a href="page.html" target="self (or name of iframe)">

emdac

9:19 pm on May 26, 2005 (gmt 0)

10+ Year Member



I still can't get it to work. Maybe I'm not applying the code correctly.

Here's the html body code. Very simple and to the point. I called the page frame1.html. Where does the code go that you suggested for me to use? Yes, I am a total newb.

<BODY>
<IFRAME name = "frame1" SRC="http://www.yahoo.com">
</IFRAME>
</BODY>

Once I open this page and click on any link in YAHOO the frame dissapears and the article opens in the entire page. I would like to keep it in the frame. Thanks again for your help.

monkeythumpa

11:05 pm on May 26, 2005 (gmt 0)

10+ Year Member



It sounds like Yahoo has a "frame buster" turned on. That means if they sense they are in a frame they will break out when you click on a link. Since you have no control over their site you might want to use a different page to stick in the frame.

emdac

3:33 pm on May 27, 2005 (gmt 0)

10+ Year Member



Is there anything that can be done to work around it or do I have other options other than an iframe that will achieve the same result?

tedster

9:47 pm on May 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, there's no way to work around another domain's framebuster. And if they don't want people framing their website, then that's a good thing, IMO.

Try switching the iframe source to one of your own pages, just to be sure you've got the code right and the trouble is really coming from the framed page.