query regarding anchor tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhishekbrave
    New Member
    • Dec 2007
    • 79

    query regarding anchor tag

    hi,
    Is it possible using anchor tag (no button) to open two links by clicking on one link, for example I clicked a link and simultaneously two pages get opened.
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Hi,

    What your going to have to do is make a link to another page.
    And then on that page put javascript to open up a new link.

    But i'm not to sure that this can be done with html alone.

    Comment

    • harshmaul
      Recognized Expert Contributor
      • Jul 2007
      • 490

      #3
      hi again.
      justr had a quick play around....

      try this


      Code:
      <a href="http://www.google.com" target="_blank" onClick="window.location.href='http://www.yahoo.com">choose your search engine</a>

      Comment

      • abhishekbrave
        New Member
        • Dec 2007
        • 79

        #4
        But the pags may change , i cannot put javascripts on that page.
        Originally posted by harshmaul
        Hi,

        What your going to have to do is make a link to another page.
        And then on that page put javascript to open up a new link.

        But i'm not to sure that this can be done with html alone.

        Comment

        • harshmaul
          Recognized Expert Contributor
          • Jul 2007
          • 490

          #5
          hi. i spent time on it just now....

          insert this insted of the hyperlink you put in there...


          Code:
          <a href="http://www.google.com" target="_blank" onClick="window.open('http://www.yahoo.com/','mywindow','width=400,height=400')">choose a site</a>

          Comment

          • abhishekbrave
            New Member
            • Dec 2007
            • 79

            #6
            thnx buddy its working fine :-)
            Originally posted by harshmaul
            hi. i spent time on it just now....

            insert this insted of the hyperlink you put in there...


            Code:
            <a href="http://www.google.com" target="_blank" onClick="window.open('http://www.yahoo.com/','mywindow','width=400,height=400')">choose a site</a>

            Comment

            • harshmaul
              Recognized Expert Contributor
              • Jul 2007
              • 490

              #7
              No worries. I'm here to help!

              Comment

              Working...