multiple selection in dropdowncontrol in jsp


how to select multiple values in a dropdownlist in jsp..
is there any code available for it?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

use a listbox control for multiple selection, combo-box is meant for single item selection
sunda2010Author Commented:
no i want coding oly in dropdownlist
can you please state your scenario in detail
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

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..
combo box wouldnt let you do i mentioned earlier you should choose a different control for this field, a list box will do ....
sunda2010Author Commented:
k thn can u send me the sample code for this?
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>

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.