2

How do you make a combobox with multiselect option? Using Javascript or HTML. allows you to select multiple options but does not provide a combo/dropdown structure.

416E64726577
  • 2,214
  • 2
  • 23
  • 47
Surya
  • 149
  • 1
  • 1
  • 10
  • Possible duplicate of http://stackoverflow.com/questions/8591311/multi-select-using-jquery – Alex Siri Mar 25 '13 at 09:19
  • Look into the following link. Its a multi-select combobox http://asimishaq.com/resources/tools/multi-select-dropdown-list/ – asim-ishaq Oct 28 '13 at 19:35

2 Answers2

5

That is not standard HTML functionality. There is either a dropdown, or a multiselect. What you can use, is a library that can handle the conversion, like http://harvesthq.github.com/chosen/.

Alex Siri
  • 2,856
  • 1
  • 19
  • 24
  • Yet another option: http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ – olsn Mar 25 '13 at 09:17
  • $("#list"+myObject.fields[loop].id).multiselect({ header: false, height: 150, minWidth: 200, classes: 'ListData', checkAllText: 'Check all', uncheckAllText: 'Uncheck all', selectedText: '# Item Selected', noneSelectedText: 'Please Select Item', selectedList: 0, autoOpen: false, multiple: true, position: { at: 'top' } }); this code displays the dropbox at random position. I need to bind it with the element. – Surya Mar 25 '13 at 10:31
-2

What about this?

<select multiple>
  <option value="1">Jan</option>
  <option value="2">Feb</option>
  <option value="3">Mar</option>
  <option value="4">Apr</option>
</select>
Edwin Alex
  • 5,118
  • 4
  • 28
  • 50