| Author |
add or remove an item from drop down
|
dinesh rackson
Greenhorn
Joined: Oct 22, 2007
Posts: 9
|
|
i have two combo boxes, combo box1 has numbers (one,two,three,four). and combo box2 has (red,green,yellow). now if i select "one" from combo box1, then only "red" and "yellow" should appear in combo box2, but if i select "two" or "three" or "four".. all the three "red","green","yellow" should appear in combo box2.. the bottom line is i need to add and remove item from a combo box dynamically using java script function in a jsp. can someone help me on this, i googled a lot but couldn find a solution. [ October 22, 2007: Message edited by: Bear Bibeault ]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
First, a terminology correction. They are not "combo boxes". They are dropdowns or select elements. A combo box is a type of control avaulable in desktop applications that is not available on the web. Get yourself a good JavaScript DOM reference and look up the API for the select element. There are methods to do what you are asking.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
dinesh rackson
Greenhorn
Joined: Oct 22, 2007
Posts: 9
|
|
sorry.. i meant drop down list box only...
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
http://www.mredkj.com/tutorials/tutorial005.html Eric
|
 |
 |
|
|
subject: add or remove an item from drop down
|
|
|