Is it possible?

Discussion in 'Web Design & Coding' started by cruiser78, Jan 19, 2003.

  1. cruiser78

    cruiser78 Me

    Messages:
    235
    Is it possible to have a single link point to 2 seperate locations? (eg. click on 1 link and it opens 2 different windows... each on seperate pages)
    Just a thought I had tonight.
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Sure, with a little Javscript it's a small deal:
    PHP:
    <SCRIPT>
    function 
    openDouble(){
        
    window.open("page1.html","Window1","");
        
    window.open("page2.html","Window2","");
    }
    </SCRIPT>

    <A HREF="javascript: openDouble()">Two links in one!</A>
    Or something similar anyway. Hope it helps! :)

    <edit>"java script" is supposed to be "Javascript" (one word). The code parser is a bit strange. ;)</edit>
     
  3. cruiser78

    cruiser78 Me

    Messages:
    235
    cool... nice info... thanks
     
  4. cruiser78

    cruiser78 Me

    Messages:
    235
    works great... but why isn't it possible to make a double link with nested <a href> tags?
     
  5. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    I don't think it is possible in a simple <a href> , but what you can do is link to a page on the server that will open 2 addresses ,that page will also be Java or PHP or ASP , so i think its just better to do it in Zedric's way.
     
  6. cruiser78

    cruiser78 Me

    Messages:
    235
    that's what i figured... o well... it still works with zedric's way
     
  7. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    I don't think anyone thought it would be necessary or even usefull when they made the HTML specs. It was a while back you know. When pages where grey with plain text on them basically. :) So single targets only for the A-tag.
     
  8. cruiser78

    cruiser78 Me

    Messages:
    235
    lol... that's true... i don't really need it now either neways... it was just a thought i had...
     
  9. cruiser78

    cruiser78 Me

    Messages:
    235
    HA... me laughs at you :D

    A v6 wouldn't stand a chance against that Z28... it'll break the tires free on dry pavement going straight... AND it's an auto so that's just from punching it, not from dropping the clutch (not that you'd have to in a Z28 with a manual neways).. and right now I've got a v6 camaro so I know what a v6 is like in a muscle car... it SUCKS.

    your '99 'stang might stand a chance... if it's a v8 and not a 6.

    by the way that car isn't mine... it was my mom's till she sold it... She was gonna give it to me for $4000 cdn but 3 days b4 I was gonna fly down her neighbor offered her $8000 so she sold it to him instead.
     
  10. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    LOL :D

    Serious OT you guys!
    "My <censoured> is bigger than yoo-ours!"
    "Na-ah!"

    :D