html - Populate Drop down based on Selection in Javascript -


i have 2 drop downs in first given names of employees , in second designation. want lets select first employee pm , tl both second drop down should show pm tm , when select pm second in first shows employees pm. want if possible multi select first drop down

 <select> <!--this main selectbox.--> <option value="">select</option> <option>john</option> <option>brendon</option> <option>davin</option> <option>bobby</option> </select> <select class="sub"> <!--another selectbox option one.--> <option>tl</option> <option>pm</option> </select> <select class="sub"> <!--another selectbox option two.--> <option>pm</option> <option>tl</option> </select> <select class="sub"> <!--another selectbox option three.--> <option>developer</option>   </select> <select class="sub"> <!--another selectbox option four.--> <option>developer</option>   </select> 

here fiddle demo

http://jsfiddle.net/7cmyj/39/

you can try somthing in example

a more structured way these actions 

http://jsfiddle.net/7cmyj/92


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -