html double link

This is a discussion on html double link within the A Brief History of Cprogramming.com forums, part of the Community Boards category; in html can i make a link that sends two different urls to two different targets(iframes)...

  1. #1
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608

    html double link

    in html can i make a link that sends two different urls to two different targets(iframes)
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  2. #2
    Registered User Commander's Avatar
    Join Date
    Sep 2001
    Posts
    804
    do a search on www.htmlgoodies.com I saw one just the other day
    oh i'm sorry! i didn;t realize my fist was rushing to meet ur face!

    MSN :: commander_android@hotmail.com []*[]

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    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>

  4. #4
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    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
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    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.
    Code:
    <!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>
    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 it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 04-04-2009, 04:45 AM
  2. html link question about linking to files for download
    By Leeman_s in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 01-01-2004, 01:27 PM
  3. Please HELP!!
    By traz in forum C++ Programming
    Replies: 4
    Last Post: 04-14-2003, 10:20 PM
  4. what's the difference?
    By iluvmyafboys in forum C++ Programming
    Replies: 13
    Last Post: 02-28-2002, 09:25 PM
  5. Hi, could someone help me with arrays?
    By goodn in forum C Programming
    Replies: 20
    Last Post: 10-18-2001, 10:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21