Forum: Ruby on Rails How do you grab the high lighted value from auto_complete_fi

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.
136fb08d3f00b3cb184d91ac67802902?d=identicon&s=25 Digimage (Guest)
on 2007-07-02 02:29
(Received via mailing list)
Any Help is appreciated.....
3f38541776a2513a20ea2f1c2d522cb3?d=identicon&s=25 Perry Smith (pedz)
on 2007-07-02 05:53
Digimage wrote:
> Any Help is appreciated.....

I had trouble with that last night too.  You need the right css to make
it work.  I went to the script.aculo.us web site and found the demo page
that uses the feature you are looking for.  Then do a show page and the
css is in the page directly.

This is what I'm using... seems to work but I have not really looked at
it.  You can move up and down the list with arrow keys, then hit tab or
return  to select it.

<style>          div.auto_complete {
            width: 350px;
            background: #fff;
          }
          div.auto_complete ul {
            border:1px solid #888;
            margin:0;
            padding:0;
            width:100%;
            list-style-type:none;
          }
          div.auto_complete ul li {
            margin:0;
            padding:3px;
          }
          div.auto_complete ul li.selected {
            background-color: #ffb;
          }
          div.auto_complete ul strong.highlight {
            color: #800;
            margin:0;
            padding:0;
          }
</style>
136fb08d3f00b3cb184d91ac67802902?d=identicon&s=25 Digimage (Guest)
on 2007-07-02 06:35
(Received via mailing list)
thanks Perry..  I'll give it a shot..



On Jul 1, 8:53 pm, Perry Smith <rails-mailing-l...@andreas-s.net>
136fb08d3f00b3cb184d91ac67802902?d=identicon&s=25 Digimage (Guest)
on 2007-07-02 06:45
(Received via mailing list)
So more Q... How do I grab that value and set it into params?
it seems like auto_complete_textfield does not put that value into
params automatically....

Any help is appreciated..
3f38541776a2513a20ea2f1c2d522cb3?d=identicon&s=25 Perry Smith (pedz)
on 2007-07-02 14:57
Digimage wrote:
> So more Q... How do I grab that value and set it into params?
> it seems like auto_complete_textfield does not put that value into
> params automatically....
>
> Any help is appreciated..

Sounds like you do not have the fields named and labeled.  Did you put a
lable?

Look at this example:

http://demo.script.aculo.us/ajax/autocompleter_customized

Good luck.
136fb08d3f00b3cb184d91ac67802902?d=identicon&s=25 Digimage (Guest)
on 2007-07-02 19:05
(Received via mailing list)
Perry.. Thanks.. But i'm using auto_complete_field and not
text_field_with_auto_complete...
I think from the example.. text_field_with_auto_complete does it
automatically..
but how do I feed the selected value into params when I'm using
auto_complete_field.

Any help is appreciated...

On Jul 2, 5:57 am, Perry Smith <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.