Is it possible to put target="_blank" in a dropdown list?

Discussion in 'HTML & Website Design' started by fadetoblack22, May 30, 2008.

  1. #1
    Is it possible to put target="_blank" in a dropdown list?

    I have tried, but it doesn't seem to be working.
     
    fadetoblack22, May 30, 2008 IP
  2. steelfrog

    steelfrog Peon

    Messages:
    537
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You'll most likely have to use a JavaScript. If you post your current dropdown menu copy, I'll try to help you out.
     
    steelfrog, May 30, 2008 IP
  3. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,399
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Here is the code:
     <form name="htmlMenu">
    
     <select name="htmlSelList" size="1">
    
    <option value="">Please select...</option>
                                                                      
    <option value="http://www.google.com">Google</option>
    
    </select>
                                                                      
    <input type="button" onClick="document.location =document.htmlMenu.htmlSelList.options [document.htmlMenu.htmlSelList.selectedIndex].value;"value="GO">
                                                                      
        </form> 
    PHP:

    thanks
     
    fadetoblack22, May 30, 2008 IP