# Auto complete rjs problem

**URL:** <https://www.ruby-forum.com/t/auto-complete-rjs-problem/158416>\
**Category:** Rails\
**Created:** [January 23, 2009, 2:03am UTC](https://www.ruby-forum.com/t/auto-complete-rjs-problem/158416 "2009-01-23T02:03:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [January 23, 2009, 2:03am UTC](https://www.ruby-forum.com/t/auto-complete-rjs-problem/158416/1 "2009-01-23T02:03:17Z")

</div>

I want to use auto\_complete plugin for a field.

I have a ajax call that loads a js partial that will insert into DOM a  
text field with auto complete (the plugin will insert for me css styles,  
an input, a div and a new Ajax.Autocompleter call).

The problem is it doesn’t work, it seems the new letter event doesn’t  
trigger a new http request for in order to bring the list of matching  
options.

Smaller problem: the input has a autocomplete=off attribute to disable  
browser default search; this attribute is omitted when the input is  
added with an ajax call.

(I succeeded making the auto\_complete work when it’s load in the page  
from the begining, not later with an ajax call.)

Thanks
