Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post

    Dropdown Options

    How can I make it so that when an option is chosen from a dropdown, then a button is clicked it takes you to a page. If you don't understand what I mean, this is the page Im having problems with:

    http://www.rallystuff.net/Past%20Vote%20Results.htm

    And I want to link to these:

    2004 - http://www.rallystuff.net/Past%20Vot...sults-2004.htm
    2005 - http://www.rallystuff.net/Past%20Vot...sults-2005.htm

    This is the code Im using:

    <select name="year" id="year">
    <option selected>Select a year...</option>
    <option>2005</option>
    <option>2004</option>
    </select>
    </p>
    <form action="" method="post" name="go" id="go">
    <div align="center">
    <input type="submit" name="Submit" value="Go">


    Any help would be much appreciated.

    Thanks,
    Curt

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    <form name="frm">
    <
    select name="year" id="year">
    <
    option selected>Select a year...</option>
    <
    option value="http://www.rallystuff.net/Past%20Vote%20Results-2005.htm">2005</option>
    <
    option value="http://www.rallystuff.net/Past%20Vote%20Results-2004.htm">2004</option>
    </
    select>
    </
    p
    <
    form action="" method="post" name="go" id="go">
    <
    div align="center">
    <
    input type="button" value="Go" onClick="window.location=document.frm.year.options[document.frm.year.selectedIndex].value>
    </form> 

  • #3
    Regular Coder CurtWRC's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    224
    Thanks
    9
    Thanked 1 Time in 1 Post
    Where do I put that?

  • #4
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's your new form...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •