How do i make a drop down list link somewhere?

Discussion in 'Programming' started by flash902007, Sep 19, 2007.

Thread Status:
Not open for further replies.
  1. #1
    Hey Guys,

    I need to create a drop down menu using the list form function that you can use when using dreamweaver. so its a drop down list. can anybody tell me what i need to do in order to make each of my items in the list link to a specific url.

    here is an example of what i currently have.

       <form id="form1" name="form1" method="post" action="">
                        <label>
                          <select name="select" id="select">
                            <option selected="selected">link</option>
                            <option>link2</option>
                          </select>
                        </label>
                      </form>
    Code (markup):
    Could someone repost the above code in the correct format for me to make each of my items link to somewhere please? id really appreciate it.

    Andy
     
    flash902007, Sep 19, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    <form id="form1" name="form1" method="post" action="">
                        <label>
    <select onchange="window.location=this.value;">
    <option value="http://example.com">link 1</option>
    <option value="http://example.com">link 2</option>
    <option value="http://example.com">link 3</option>
    </select>
                        </label>
                      </form>
    
    HTML:
     
    nico_swd, Sep 19, 2007 IP
    flash902007 likes this.
  3. flash902007

    flash902007 Banned

    Messages:
    750
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Aww thanks very much for that. i really appreciate it. left green reps for you :)

    Thanks again
    Andy
     
    flash902007, Sep 19, 2007 IP
Thread Status:
Not open for further replies.