Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Iframes... Most annoying thing ever PLEASE help

Iframes targeting other iframes in the Parent Page



8:21 am on Feb 25, 2004 (gmt 0)

10+ Year Member

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.


1:03 pm on Feb 25, 2004 (gmt 0)

10+ Year Member

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


6:34 pm on Feb 25, 2004 (gmt 0)

10+ Year Member

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>


9:44 pm on Feb 25, 2004 (gmt 0)

10+ Year Member

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:01 pm on Feb 25, 2004 (gmt 0)

10+ Year Member

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;


11:09 pm on Feb 25, 2004 (gmt 0)

10+ Year Member

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

Featured Threads

Hot Threads This Week

Hot Threads This Month