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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Setting Pulldowns to a default

    Hello,

    I'm using pull downs for date but it always starts up "Dec" "31" "Year". How can I set it to start as "Month" "Date" "Year"?

    Thanks.

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    >
    <
    html>
    <
    head>
    <
    title>Main</title>

    </
    head>
    <
    body>
    <
    br>
    <
    form name="form1" id="startOfForm">
    <
    table><tbody>
        <
    tr>
            <
    td class="question"><label for="birthdate">Select Birthdate</label></td>
            <
    td>
                <
    select name="selMonth" id="selMonth" >
                <
    option value=0 selected>Month</option>    <option selected value="1">Jan</option>
                <
    option selected value="2">Feb</option> <option selected value="3">Mar</option>
                <
    option selected value="4">Apr</option> <option selected value="5">May</option>
                <
    option selected value="6">Jun</option> <option selected value="7">Jul</option>
                <
    option selected value="8">Aug</option> <option selected value="9">Sept</option>
                <
    option selected value="10">Oct</option> <option selected value="11">Nov</option>
                <
    option selected value="12">Dec</option>
                </
    select>
                <
    select name="selDate" id="selDate" >
                <
    option value=0 selected>Date</option> <option selected value="1">1</option>
                <
    option selected value="2">2</option> <option selected value="3">3</option>
                <
    option selected value="4">4</option> <option selected value="5">5</option>
                <
    option selected value="6">6</option> <option selected value="7">7</option>
                <
    option selected value="8">8</option> <option selected value="9">9</option>
                <
    option selected value="10">10</option> <option selected value="11">11</option>
                <
    option selected value="12">12</option> <option selected value="13">13</option>
                <
    option selected value="14">14</option> <option selected value="15">15</option>
                <
    option selected value="16">16</option> <option selected value="17">17</option>
                <
    option selected value="18">18</option> <option selected value="19">19</option>
                <
    option selected value="20">20</option> <option selected value="21">21</option>
                <
    option selected value="22">22</option> <option selected value="23">23</option>
                <
    option selected value="24">24</option> <option selected value="25">25</option>
                <
    option selected value="26">26</option> <option selected value="27">27</option>
                <
    option selected value="28">28</option> <option selected value="29">29</option>
                <
    option selected value="30">30</option> <option selected value="31">31</option>
                </
    select>
                <
    select name="selYear" id="selYear" >
                <
    option value=0 selected>Year</option> <option value="2001">2001</option>
                <
    option value="2000">2000</option> <option value="1999">1999</option>
                <
    option value="1998">1998</option> <option value="1997">1997</option>
                <
    option value="1996">1996</option> <option value="1995">1995</option>
                <
    option value="1994">1994</option> <option value="1993">1993</option>
                <
    option value="1992">1992</option> <option value="1991">1991</option>
                <
    option value="1990">1990</option> <option value="1989">1989</option>
                </
    select>
            </
    td>
        </
    tr>
        <
    tr>
            <
    td colspan=2><input type="submit" value="Submit form"></td>
        </
    tr>
    </
    tbody></table>
    </
    form>
    </
    body>
    </
    html

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,026
    Thanks
    36
    Thanked 494 Times in 488 Posts
    Remove the 'selected' from all but one <option...> (the first in your pulldown list)

  • Users who have thanked jmrker for this post:

    coolecho (04-28-2010)


  •  

    Posting Permissions

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