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 Coder
    Join Date
    Apr 2005
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Additional Select Fields

    I'm trying to create a little script that adds a new SELECT form element when an item is selected on the first one.

    Code:
    <select name="colors">
        <optgroup label="Choose a Color">
            <option name="red">Red</option>
            <option name="green">Green</option>
            <option name="blue">Blue</option>
        </optgroup>
    </select>
    For instance, if someone selects Green, another select list appears below the first one.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Are the other select lists already going to be created in the HTML or is it generated some how? Would you could do is have them made in the HTML set all of their displays to none using CSS then depending on the option selected the corresponding select display will change to inline or block.


  •  

    Posting Permissions

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