View Full Version : can u specify multiple targets for a single link?
i.e when some 1 clicks on a resource in the Nav bar. Can i do it so that 2 frames change, just by clicking on 1 link. i tried the following
<a href="page1.html" target="main"> <a href="page2.html" target="side1"> click here to change both frames</a></a>
but it did'ent work
surly it can be done??
cheers again
might be a stupid answer, but wouldn't the best thing to be to have it link to a new frameset...
so you get a new frames for both?
mr_grumpy_man
24-09-2000, 00:32
Probably possible with javascript. Javascript is good :cheese:
Do an onlick and then(using your example frame names):
top.main.document.location="newpage1.html";
top.side1.document.location="newpage2.html";
That should work, but I'm not so sure on the object model for frames.
Give it a go and get back to me.
thanks for the replys guys
i think i will have to do a new frameeset, i did'ent want to cause it's only 2 out of the 4 frames i wanted to change, but i can't write Java, so it's probably my best bet
Thanks anyway Grumpy_Man, maybe i can find a similar pre-written script, and try and customise it
Thanks
Give this a whirl m8y:
Stick this between the head tags:
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
Then whack this against your link:
<a href="#" onClick="MM_goToURL('main','page1.htm');MM_goToURL('side1','page2.html');r eturn document.MM_returnValue">Click here to change both frame</a>
And that should work a treat dude.
mr_grumpy_man
24-09-2000, 23:45
Like I said.
But better :D
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.