Forum Moderators: coopster

Message Too Old, No Replies

getting iframes determined by php to communicate

they're not acting like i'd like them to.

         

mylungsarempty

6:37 am on Jan 4, 2004 (gmt 0)

10+ Year Member



This is a tricky one, guys...

Let me set up a hierarchy real quick:

index.php is a frameset with a frame set to 100% src=theindex.php

theindex.php contains two inline frames

there is php code to determine which document the inline frames will link to... i.e. if var = 02 { <iframe src="this.php"> } elseif var = 03 { <iframe src="that.php"> }

what i am trying to accomplish is that links in the 'left' iframe will target the page displayed in the 'right' iframe, and vice versa... i am having enormous difficulty achieving this though. I've tried several variations on the code, and each time i run into a problem. It just occured to me that i may need to implement some JavaScript to get this to work... any thoughts?

dmorison

9:48 am on Jan 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Doesn't the standard target="name" work - I notice there is no name attribute in your example code (but you probably just left it out)...

Adds:

Just did a quick test, and IFRAME's behave just the same as traditional framesets as far as target="" is concerned, so all you need to do is give your right hand iframe a name attribute (for example name="myrightframe"); and then the links in your left hand frame are along the lines of:

<a href='somepage.php' target='myrightframe'>Click here!</a>