Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > drop down list with multiple selection

Reply
Thread Tools

drop down list with multiple selection

 
 
bbxrider
Guest
Posts: n/a
 
      06-27-2003
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?


 
Reply With Quote
 
 
 
 
spaghetti
Guest
Posts: n/a
 
      07-02-2003

"bbxrider" <(E-Mail Removed)> wrote in message
news:nk3La.35665$Fy6.10597@sccrnsc03...
> 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...



 
Reply With Quote
 
 
 
 
asim709 asim709 is offline
Junior Member
Join Date: Oct 2013
Posts: 1
 
      10-29-2013
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
1st Drop-down selection determins selected value in all drop-downs In ASP.Net Wizard jaysch ASP .Net 0 04-30-2011 02:19 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Multiple select drop down poplulating sub drop down scott@dettcom.com Javascript 3 11-09-2006 07:50 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
How do I programmatically select and highlight a selection in a drop down list Karl Seguin ASP .Net 3 02-10-2004 10:20 PM



Advertisments