# How do you grab the high lighted value from auto\_complete\_fi

**URL:** <https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301>\
**Category:** Rails\
**Created:** [July 2, 2007, 2:29am UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301 "2007-07-02T02:29:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Post date:** [July 2, 2007, 2:29am UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301/1 "2007-07-02T02:29:34Z")

</div>

Any Help is appreciated…

---

<div class="post-metadata">

**Author:** ![Digimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Post date:** [July 2, 2007, 5:53am UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301/2 "2007-07-02T05:53:54Z")

</div>

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](http://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.

 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; }

---

<div class="post-metadata">

**Author:** ![Digimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Post date:** [July 2, 2007, 6:35am UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301/3 "2007-07-02T06:35:48Z")

</div>

thanks Perry… I’ll give it a shot…

On Jul 1, 8:53 pm, Perry S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Digimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Post date:** [July 2, 2007, 6:45am UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301/4 "2007-07-02T06:45:49Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Digimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Post date:** [July 2, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301/5 "2007-07-02T14:57:31Z")

</div>

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](http://demo.script.aculo.us/ajax/autocompleter_customized)

Good luck.

---

<div class="post-metadata">

**Author:** ![Digimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Post date:** [July 2, 2007, 7:05pm UTC](https://www.ruby-forum.com/t/how-do-you-grab-the-high-lighted-value-from-auto-complete-fi/108301/6 "2007-07-02T19:05:40Z")

</div>

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 S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
