Forum: Ruby on Rails mix between the autocomplete and drop down

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0612733748b42ad784fdfd27ee87427f?d=identicon&s=25 David Modernfossil (modernfossil)
on 2007-07-12 07:15
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
E12b4e08465871a3770f67ebc0abf805?d=identicon&s=25 Bernardo de Pádua (Guest)
on 2007-07-12 09:10
(Received via mailing list)
The Ext js library has what you need. Look for the Combo Box.

http://extjs.com

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 Modernfossil <rails-mailing-l...@andreas-
This topic is locked and can not be replied to.