homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Iframes... Most annoying thing ever PLEASE help
Iframes targeting other iframes in the Parent Page

10+ Year Member

Msg#: 7354 posted 8:21 am on Feb 25, 2004 (gmt 0)

Hi there, I'm not exactly new to Iframes but I am really stuck here this time. The problem is:

I have One main page consisting of some floating tables. One small one for Nav, one Big one for main body, and one medium sized one for Picture viewing. Now the nav bar links to the iframe on the main table. This Iframe has a list of thumbnails of pictures to be viewed. It was supposed to work that when you click on one of those thumbnails in that iframe, it would load a description in another iframe on the main page(parent page I guess), and also a Picture on a secondary Iframe also on the main page. All three Iframes are on the main page. But for the life of me I CANNOT get the links in the first iframe to target the other iframes. Forget the fact that I'm trying to load two frames at once.. I know you can do this with java... but for now can somone tell me how I can get the links within the first iframe to affect the other iframes on the parent page. thanks in advance.



10+ Year Member

Msg#: 7354 posted 1:03 pm on Feb 25, 2004 (gmt 0)

Call me crazy, but shouldn't you be using REGULAR frames if you want to achieve this?


10+ Year Member

Msg#: 7354 posted 6:34 pm on Feb 25, 2004 (gmt 0)

You have to use a little javascript...

Within the body of the page that appears in the first iframe, use something like,

<a href = "javascript: parent.iframename.src = 'pathtofilename.fileext'">blah anchor text</a>


10+ Year Member

Msg#: 7354 posted 9:44 pm on Feb 25, 2004 (gmt 0)

I'm not sure I comepletly know what you mean. think of it this way. I have an Iframe we will call it Iframe1. There are links within Iframe1 that are supposed to link to pages in Iframe2 and Iframe3. both Iframe2 and 3 have diffrent content but need to be shown when the link is clicked inside Iframe1. Currently I can't even get The links in Iframe1 To target the other Iframes at all.

And no I cannot use normal frames for this becuase of the visual makeup of the page.


10+ Year Member

Msg#: 7354 posted 10:01 pm on Feb 25, 2004 (gmt 0)

Right. So, if you have the link in iframe1 is like I had before, then the src of iframe2 will be changed to the new path. It would be more efficient I suppose if you made a .js script that changed the other two at the same time.

in iframe1's page:

<a href = "javascript: change_iframe_content('iframe2src', 'iframe3src')">change me</a>

function change_iframe_content(val1, val2)
parent.iframe2.location = val1;
parent.iframe3.location = val2;


10+ Year Member

Msg#: 7354 posted 11:09 pm on Feb 25, 2004 (gmt 0)

damnit! two words... Case sensitive. Thanks very much for the help guys.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved