Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-20-2005, 09:11 AM   PM User | #1
roxii
New Coder

 
Join Date: Apr 2005
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
roxii is an unknown quantity at this point
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.
roxii is offline   Reply With Quote
Old 12-20-2005, 09:25 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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.
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:12 AM.


Advertisement
Log in to turn off these ads.