• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

multiple selection in dropdowncontrol in jsp

sir,

how to select multiple values in a dropdownlist in jsp..
is there any code available for it?
0
sunda2010
Asked:
sunda2010
  • 3
  • 3
1 Solution
 
sufianmehmoodCommented:
use a listbox control for multiple selection, combo-box is meant for single item selection
0
 
sunda2010Author Commented:
no i want coding oly in dropdownlist
0
 
sufianmehmoodCommented:
can you please state your scenario in detail
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
sunda2010Author Commented:
selecting multiple values in the combobox.. for ex..if my dropdown has values from 1,2..10.. then i hav 2 select  any 4 values from the dropdownlist box..
0
 
sufianmehmoodCommented:
combo box wouldnt let you do that......as i mentioned earlier you should choose a different control for this field, a list box will do ....
0
 
sunda2010Author Commented:
k thn can u send me the sample code for this?
0
 
mtomimitsuCommented:
You can specify "size" attribute and "multiple" attribute when you write your <select> tag.

"size" attribute lets open the list and shows the specified number of items in the box.

"multiple="multiple"" attribute lets users select multiple items in the "open" list.
<select name="items" multiple="multiple" size="3">
  <option value="item-1">item 1</option>
  <option value="item-2">item 2</option>
  <option value="item-3">item 3</option>
  <option value="item-4">item 4</option>
</select>

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now