in html can i make a link that sends two different urls to two different targets(iframes)
in html can i make a link that sends two different urls to two different targets(iframes)
do a search on www.htmlgoodies.com I saw one just the other day
With a little Javascript....
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>2 Jumps</title> <script> function YAGO(){ frame1.location.href="http://www.yahoo.com"; frame2.location.href="http://www.google.com"; } function FDCP(){ frame1.location.href="http://www.cprogramming.com"; frame2.location.href="http://www.flashdaddee.com"; } </script> </head> <body> <iframe name="frame1" width="300" Height="300"> </iframe> <iframe name="frame2" width="300" Height="300"> </iframe> <br> <a onClick="YAGO();" >Click here for Yahoo & Google</a> <br> <a onClick="FDCP();" >Click here for CProg & Flashdaddee</a> </body> </html>
is it possible so it (the javascript code) make it so when they put their mouse over the javascript link it turns into the hand poiting iwht its index finger like your mouse does when putting it over a normla html link
Hmm......probably a better method....but what I did below is add a normal hyperlink.......link that to one of the frames, and then added an extra event handler to set the location of the other frame...Ugly, but effective.
I tried it with dummy hyperlinks ( ala <a href="#" onClick="YAGO();">), this worked in Internet Explorer, but Opera ( my main browser) didnt like it...so I abandoned itCode:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>2 Jumps</title> <script> function YAGO(){ frame2.location.href="http://www.google.com"; } function FDCP(){ frame2.location.href="http://www.flashdaddee.com"; } </script> </head> <body> <iframe name="frame1" width="300" Height="300"> </iframe> <iframe name="frame2" width="300" Height="300"> </iframe> <br> <a href="http://www.yahoo.com" onClick="YAGO();" target="frame1"> Click here for Yahoo & Google</a> <br> <a href="http://www.cprogramming.com" onClick="FDCP();" target="frame1"> Click here for CProg & Flashdaddee</a> </body> </html>