Forum: Ruby on Rails Ajax.Autocompleter with an empty field

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.
97ca2e94ba373515aa387feee67d613e?d=identicon&s=25 Joshua Gitlin (Guest)
on 2006-03-03 00:03
(Received via mailing list)
Hey guys,

I have a field that will have very few autocomplete options. I have
an ajax.autocompleter on it that works great, but I wanted to make it
start autocompleting as soon as the field is blur()ed, so that even
if the field is empty, the list will still appear. Like a combo box
in windows. How can I do this? Setting :min_chars => 0 (or even -1)
didn't work...

-Josh
6e3e6591ebb75db8d1f94bb67bf681d9?d=identicon&s=25 Chaz_Meister_Rock (Guest)
on 2006-03-11 22:20
97ca2e94ba373515aa387feee67d613e?d=identicon&s=25 Joshua Gitlin (Guest)
on 2006-03-11 23:45
Chaz_Meister_Rock wrote:
> checkout the "frequency" option:
>
> http://wiki.script.aculo.us/scriptaculous/show/Aja...

Well, that didn't work. But it made me realize that :min_chars isn't
working, either! My code is:

<%=
text_field_with_auto_complete :the_object, :project_name, {}
                              {:with =>
"'client='+$F('the_object_client_id')+'&'+value",
                               :min_chars => 3,
                               :frequency => 0.1
                              }
%>

Yet even with :min_chars => 3, the text filed auto completes with one
char...

Am I doing this wrong?
This topic is locked and can not be replied to.