Forum: Ruby on Rails Multi-character dropdown

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.
Michael S. (Guest)
on 2007-02-04 21:30
The normal behavior for a drop-down (combo) box is to position itself to
the next entry *STARTING* with the character typed. In my experience,
the more desired behavior would be to position it according to the total
characters typed. In other words, If I type "AND", I'd like the box to
position itself to the first entry starting with "AND".

Does anyone know a way to accomplish this?

Thanks in advance
---Michael
Benoit B. (Guest)
on 2007-02-05 05:32
(Received via mailing list)
Works with firefox, not with IE (others?)
If you want a real combo box, and not a simple html dropdown, try the
auto complete helpers.
The drop down will be generated by your server (via an xhr), you'll be
free to do whatever you want with the string entered. Yet I don't know
any simple way to get an ID back from the selected entry if the
selected string is not itself a key in the database. I used to hack my
way out by passing an "[id]" in the string and parsing it, but that is
fugly :/  May or may not be a good choice, then.
Michael S. (Guest)
on 2007-02-05 06:14
Benoit B. wrote:
> Works with firefox, not with IE (others?)

Multi-character selects work with FireFox? I'm missing something here.
Is that a configuration parameter - or am I losing it? I don't recall
seeing this behavior. As a Linux type, Firefox is my main browser.
Benoit B. (Guest)
on 2007-02-05 10:10
(Received via mailing list)
Firefox win32 does it, for sure. But a lot of people are not
accustomed to it and won't use it, since IE doesn't support it. It's
very handy with country selection drop-down, esp. in China (I hate
Chili! :O)
Michael S. (Guest)
on 2007-02-05 17:04
Benoit B. wrote:
> Firefox win32 does it,

By default, or do you enable it somehow? Is it only in Firefox's combos,
or in combo boxes on forms on the web? If the former, it's just the way
they programmed it (I do that, too) - If the latter, I'm *REALLY*
interested.
Benoit B. (Guest)
on 2007-02-06 07:40
(Received via mailing list)
It works on any combo-box, and it's a default setting that have been
there for ages...
I don't understand why you would be "*REALLY* interested" in that
since you don't have any way to change this behavior on other browsers
(As far as I know).
Michael S. (Guest)
on 2007-02-06 23:28
Benoit B. wrote:
> It works on any combo-box, and it's a default setting that have been
> there for ages...
> I don't understand why you would be "*REALLY* interested" in that
> since you don't have any way to change this behavior on other browsers
> (As far as I know).

What I'm doing is a specialized application. If I ask them to use
Firefox for it, they will.
This topic is locked and can not be replied to.