Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good Javascript Combo Box replacement for combo boxes with tons of elements?

I have a page where my combo box has hundreds of elements which makes it very hard to pick the one item I want. Is there a good Javascript replacement that would do better than

<select id="field-component" name="field_component"> 
                  <option selected="selected">1</option><option>2</option>...
</select>

Is there something with "Intellisense"-like auto-complete?

like image 804
Epaga Avatar asked Nov 04 '08 15:11

Epaga


3 Answers

In HTML 5 there's standard combo box.

Currently only Opera supports it, but if you happen to be time traveller or writing Opera-only application, it's a nice solution :)

<input type=text list=listid>
<datalist id=listid>
  <select><option>1<option>2</select>
</datalist>
like image 141
Kornel Avatar answered Sep 22 '22 17:09

Kornel


http://www.dhtmlx.com/images/logo_combo.gif
You have dhtmlCombo, using ajax to retrieve data when you are filling the input field.

dhtmlxCombo is a cross-browser JavaScript combobox with autocomplete feature.

It extends basic selectbox functionality to meet the requirements of the most up-to-date web applications.

dhtmlxCombo can be converted from existing HTML SELECT or populated with JavaScript. Supporting AJAX, it can also get list values from the server datasource dynamically.

like image 29
VonC Avatar answered Sep 25 '22 17:09

VonC


Check the jQuery Autocomplete plugin, it's easy to use, you only have to generate a JSON response server side.

See this demos.

like image 25
Christian C. Salvadó Avatar answered Sep 26 '22 17:09

Christian C. Salvadó