anchor tag links to more than 3? Possible?

admin

Administrator
Staff member
Is it possible to make an anchor tag link to more than one document at the same time?<br />
<br />
like i have this anchor<br />
<AREA SHAPE=RECT COORDS="60,103,148,144" HREF=http://www.htmlforums.com/archive/index.php/"#home" ALT="Home" OnMouseOut="window.status=''; return true" OnMouseOver="window.status='Home'; return true"><br />
<br />
and i have <br />
3 anchors tag with<br />
<br />
<a name=home><br />
in several layers on the same page.<br />
<br />
Anyone know if it is possible to do it?<!--content-->What you'd have to do is something like:<br />
onclick="findTarget('home'); return false"<br />
<br />
and then have a function findTarget(hash) that finds which "layer" is currently visible and then sets the window.location property to that anchor.<br />
<br />
findTarget(hash) {<br />
var newsite = ""<br />
var h1 = hash + "_1" // eg. home_1<br />
var h2 = hash + "_2" // eg. home_2<br />
//...<br />
if (the_layer_with_home_1_is_visible) newsite = h1;<br />
if (the_layer_with_home_2_is_visible) newsite = h2;<br />
//...<br />
if (newsite) self.location = self_location + "#" + newsite;<br />
}<br />
<br />
The tricky bit is deciding which "layer" is visible.<!--content-->thnx im gonna check that, but is it possible to do it without actually using JS? <br />
To controll Four Links with one anchor only?<br />
<br />
I tried doing<br />
<a href=http://www.htmlforums.com/archive/index.php/"#home","#home","#home","#home"><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#home";"#home";"#home";"#home"><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#home,#home,#home,#home"><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#home;#home;#home;#home"><br />
<br />
I wonder if this is possible<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"'#home','#home','#home','#home'"><!--content-->No it is not possible. you need javascript. Jon gave you a very ingenious way to do it. learn from what he has to offer.<!--content-->
 
Back
Top