changing iframes in another frame?

liunx

Guest
HI,<br />
<br />
This may sound a little complex.<br />
<br />
I am trying to change two iframes with ONE link located in a different frame:<br />
<br />
So:<br />
<br />
Link x in FRAME1 should change IFRAMEa and IFRAMEb in FRAME2<br />
<br />
Is this possible?<br />
<br />
Thx!<!--content-->What you want to do is done in a scripting language like JavaScript. Here is a way to do it with regular frames (I used frame2 and frame3 since you have two iframes in one frame):<br />
<br />
The link -<br />
... href=http://www.webdeveloper.com/forum/archive/index.php/"#" onClick="javascript: loadLink('pageReferredForMain.htm', 'pageReferredForMenu.htm')"<br />
<br />
The JavaScript function (this goes in the <head> section)-<br />
<script language='JavaScript'><br />
function loadLink(mainPage, menuPage)<br />
{<br />
parent.frames["frame2"].document.location = frame2;<br />
parent.frames["frame3"].document.location = frame3;<br />
}<br />
</script><br />
<br />
or<br />
<br />
The JavaScript/link in one-<br />
... onClick="javascript: parent.parent.framename_goes_here.location='frame_2_filename.ext';parent.parent.framename_goes_here. location='frame_3_filename.ext'"<br />
<br />
Hope this gives you an idea!<br />
<br />
Note: In the onClick attribute, it says 'java script:' with a space which is incorrect. Just delete the space.<!--content-->
 
Back
Top