drop down list with multiple selection

Discussion in 'HTML' started by bbxrider, Jun 27, 2003.

  1. bbxrider

    bbxrider Guest

    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?
     
    bbxrider, Jun 27, 2003
    #1
    1. Advertising

  2. bbxrider

    spaghetti Guest

    "bbxrider" <> 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...
     
    spaghetti, Jul 2, 2003
    #2
    1. Advertising

  3. bbxrider

    asim709

    Joined:
    Oct 29, 2013
    Messages:
    1
    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/
     
    asim709, Oct 29, 2013
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    784
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,035
    weiwei
    Jan 5, 2007
  3. jaysch
    Replies:
    0
    Views:
    1,246
    jaysch
    Apr 30, 2011
  4. Replies:
    5
    Views:
    284
  5. Replies:
    3
    Views:
    297
Loading...

Share This Page