Thread: html double link

  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: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  2. #2
    Registered User Commander's Avatar
    Join Date
    Sep 2001
    Posts
    801
    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 :: [email protected] []*[]

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    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: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    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, 03: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, 09: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, 09:48 AM