change 2 frames at once with a link

windows

Guest
Hi,<br />
<br />
I would like to change two frames with one click. I only found out how Joe on HTMLGoodies did it. He used a form and a button, but I want to do it with a link:<br />
<br />
<a class="2" href=http://www.webdeveloper.com/forum/archive/index.php/"home.html" target="main">Home</a><br />
<br />
and I want to be able to influce the appearance of the link with a css.<br />
<br />
This is the code I found if I wanted a button :<br />
<br />
<FORM><br />
<INPUT TYPE="button" Value="Change Two Frames at Once" <br />
onClick="parent.frames[2].location='foto.html'; <br />
parent.frames[3].location='menufoto.html';"><br />
</FORM><br />
<br />
Is there a possibility to adapt the code or use any different code to realize the chage of 2 frames at once.<br />
<br />
Thanks for your reply<br />
Pir<!--content-->you can do something like that:<br />
<br />
<script language=javascript><br />
function change(frameName,url)<br />
{<br />
var t = parent.[frameNumber];<br />
t.self.location.href=http://www.webdeveloper.com/forum/archive/index.php/url;<br />
}<br />
</script><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"test.html" target="main" onClick="change('1','test2.html')">test</a><!--content-->Thank you for your reply, but I don't know so much about JavaScript. Could you tell me how I include a second frame. I don't really get the syntax:<br />
<br />
It should look like this:<br />
The link:<br />
<a class="2" href=http://www.webdeveloper.com/forum/archive/index.php/"home.html" target="main">Home</a> <br />
<br />
in frame nr.2 it should open foto.html<br />
in frame nr.3 it should open fotomenu.html<br />
<br />
Thanks<br />
Pir<br />
<br />
PS: target=main(=2 frame), so I guess I will have to take that one out of the a href,won't I<!--content-->
 
Back
Top