# Text\_field\_with\_auto\_complete AND observe\_field on same field?

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152>\
**Category:** Rails\
**Created:** [August 6, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152 "2008-08-06T15:22:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [August 6, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152/1 "2008-08-06T15:22:27Z")

</div>

Hello.

I have a field on my page that I create with  
text\_field\_with\_auto\_complete. The auto-complete functionality works  
well.

I found an observe\_field sample and got it working stand-alone in its  
own page. I was amazed at how easy it was to get it working. Thanks  
RoR magic! 🙂

What I need to do is to have the observe\_field functionality ‘observe’  
my auto-complete field but I have been, so far, unable to make it  
work.

Is it possible that by having the field generated with the  
text\_field\_with\_auto\_complete I cannot observe the field with an  
observe\_field? And if that is the case, can I observe the ‘target’  
field instead so when it gets the focus I call an action that  
generates the drop-down I need?

Thanks a lot.

Pepe

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [August 6, 2008, 3:34pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152/2 "2008-08-06T15:34:10Z")

</div>

Are you using a frequency on your observer? If not try adding one  
:frequency =\> 0.25

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [August 6, 2008, 3:47pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152/3 "2008-08-06T15:47:03Z")

</div>

Yes, I am. BTW, is there a way of telling the auto-complete to run  
‘onkeyup’?

Thanks.

Pepe

On Aug 6, 9:33 am, MW Administrator [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [August 6, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152/4 "2008-08-06T15:58:11Z")

</div>

I would imagine there is - check out the source code (in the plug in if  
you’re going that route).

I had corrected a similar issue via the frequency - wish I could have  
been more help.

---

<div class="post-metadata">

**Author:** ![pepe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://www.ruby-forum.com/u/pepe)\
**Post date:** [August 6, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-observe-field-on-same-field/145152/5 "2008-08-06T16:29:48Z")

</div>

Don’t worry. I’m sure I’ll get through this one too. 😉

Thanks.

Pepe

On Aug 6, 9:57 am, MW Administrator [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
