drop down list with multiple selection

B

bbxrider

my editor is easyhtml
when i add the multiple parameter to the drop down list it changes it from a
drop downlist
to a single line list, with the up down arrows, i want have the multiple
capability with a dropdown
list and also be
able to limit the number of selections allowed, and then have the previous
selections highlighted
if you go back to change or check the selections you already made, i know
i've seen this on other
web sites
is this a limitation of my editor or do i have to do this in java script?
 
S

spaghetti

bbxrider said:
my editor is easyhtml
when i add the multiple parameter to the drop down list it changes it from a
drop downlist
to a single line list, with the up down arrows, i want have the multiple
capability with a dropdown
list and also be
able to limit the number of selections allowed, and then have the previous
selections highlighted
if you go back to change or check the selections you already made, i know
i've seen this on other
web sites
is this a limitation of my editor or do i have to do this in java script?

Dropdown boxes should *not* support multiple selections. It's just
unintuitive (you have to expand the box everytime you want to select
something, which is two-clicks minimum). You'll have to settle with a
listbox... remember that this won't necessarily show up the same on all
platforms/devices!

<select multiple size="3">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
</select>

This will create a listbox 3 rows high that allows multiple selections. On
Windows the user has to hold down the CTRL key while selecting additional
options. You can set the restrictions on how many options are selected
inside your form processing script, or you can use Javascript as well... but
you'll have to visit comp.lang.javascript for info on that.

IMHO you should be using checkboxes:

<input type="checkbox" value="1">Option 1<br>
<input type="checkbox" value="2">Option 2<br>
<input type="checkbox" value="3">Option 3<br>
<input type="checkbox" value="4">Option 4

Which will be easier to code with Javascript anyway...
 
Joined
Oct 29, 2013
Messages
1
Reaction score
0
JavaScript: Muti-Select Dropdown List

In the past I were in similar situation where I needed a combobox with multi-select option. So I developed my own JavaScript component. It is like a regular select but displays check boxes with each item in the list for multiple selection. It also has all option. The best part is that its written in simple JavaScript and no JavaScript library (jquery, dojo, yui etc) is used. One can also extend it using prototypal inheritance. You may look into the following URL for download and usage information:

asimishaq.com/resources/tools/multi-select-dropdown-list/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top