Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a select box with jQuery AutoComplete?

Right now I have my Autocomplete widget in a text box. Ideally, it would be a Select box, but I can't figure out how to let somebody type in a select box.

So I am relegated to having a text box and a hidden box. The hidden box should get updated with the id of what displays in the text box.

I am pretty new to jQuery, at least on an in-depth level like this. Am I making this harder than I need to? I definitely need autocomplete, because there are potentially hundreds of thousands of possible values.

like image 732
AKWF Avatar asked Oct 10 '11 19:10

AKWF


1 Answers

You should look into the jQuery plugin called chosen.
I think it's the best jQuery plugin written in the past year (or more).

Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.

like image 154
Joseph Silber Avatar answered Sep 28 '22 04:09

Joseph Silber