views:

275

answers:

3

Okay, I have an html page with two iframes on it so.

-------------------------------------------------
|              PARENT                           |
|                                               |
|                                               |
|     [iframe1 id=i1 name=i1]                   |    
|                                               |
|                                               |
|                                               |
|     [iframe2 id=i2 name=i2]                   |
|                                               |
|                                               |
-------------------------------------------------

When I click on a link in iframe1, i need the resulting page to display in iframe2. I have tried:

<a href=blah.html target=parent.i2>link</a>

but that does not work.

any one know how to do this?

+3  A: 

I think you might need JavaScript. Something like

 onclick="javascript:parent.i2.document.location='blah.html'"
Lou Franco
+1  A: 
<a href=blah.html target="i2">link</a>

You just need to put "i2" it should be unique window name in this page. No need to specify parent etc.

Akash Kava
This is a much better answer than mine.
Lou Franco
Thanks, but your answer is good too, its all just different ways.
Akash Kava
A: 

Why are you needing to do this? Nesting iframes will compromise the performance of your page quite significantly.

Evernoob