# Mix between the autocomplete and drop down

**URL:** <https://www.ruby-forum.com/t/mix-between-the-autocomplete-and-drop-down/109181>\
**Category:** Rails\
**Created:** [July 12, 2007, 7:15am UTC](https://www.ruby-forum.com/t/mix-between-the-autocomplete-and-drop-down/109181 "2007-07-12T07:15:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [July 12, 2007, 7:15am UTC](https://www.ruby-forum.com/t/mix-between-the-autocomplete-and-drop-down/109181/1 "2007-07-12T07:15:46Z")

</div>

I’m trying to build a mix between the autocomplete and a normal drop  
down. A

I’m trying to build a drop down that allows the user to type in desired  
selection. Normal drop downs simply go to the first occurrence of the  
words that start with the typed letter.

For example if we had a list of states (only showing A’s and M’s here -  
see below). And I typed “M” the drop down would select Maine - the  
first occurrence of the letter “M” words. If I typed in the letter “A”  
after the letter “M” the drop down would then select Alabama - the first  
occurrence of the letter “A” words.

I am looking for a solution that would select Maine after I typed in “M”  
and then “A”. To continue the example if I typed in “R” following these  
letters it would select Maryland.

Autocomplete is not quite what I need because I don’t want the user to  
have quite as much freedom to type whatever they want. They should only  
be able to select something inside the drop down, but I want them to be  
able to find there selection by typing in more than just the first word.

Alabama  
Alaska  
Arizona  
Arkansas  
…  
…  
Maine  
Maryland  
Massachusetts  
Michigan  
Minnesota  
Mississippi  
Missouri  
Montana

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [July 12, 2007, 9:10am UTC](https://www.ruby-forum.com/t/mix-between-the-autocomplete-and-drop-down/109181/2 "2007-07-12T09:10:30Z")

</div>

The Ext js library has what you need. Look for the Combo Box.

> **[Sencha.com](https://www.sencha.com)**
>
> Build web apps faster with Sencha Java and Javascript Frameworks. Our high performance UI components are customizable and easy to integrate. Work smart with Sencha.

But the regular HTML Select Box (in Firefox, at least) acts just the  
way you want, you just need to type fast. I agree it is not very good,  
though.

Cheers,

Bernardo

On Jul 12, 2:15 am, David M. \<rails-mailing-l…@andreas-
