Problem using auto_complete text field

Hi All

I wanted to add a search feature for my site and thought of using the
auto_complete text field.

The following is my table.

mysql> desc tips;
±------------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------±-------------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| description | text | YES | | NULL | |
| title | varchar(100) | YES | | NULL | |
±------------±-------------±-----±----±--------±---------------+

I have the following in the list.rhtml

.... .... <%= javascript_include_tag "prototype" %> .... .... .... .... Title: <%= text_field_with_auto_complete :tip, :title %> .... ....

and I have the following in the controller “tips_controller.rb”

class TipsController < ApplicationController
auto_complete_for :tip, :title

def index
list
render :action => ‘list’
end



end

I see a text box appearing and also a div below it.

But i dont see anything changing.

Should I add anything else ?

Thanks
Prasanna

On Feb 20, 2007, at 11:28 AM, Prasanna Kumar Nagasamudram wrote:

I have the following in the list.rhtml

.... .... <%= javascript_include_tag "prototype" %>

Autocompletion needs script.aculo.us as well:

<%= javascript_include_tag :defaults %>

– fxn

Xavier N. wrote:

On Feb 20, 2007, at 11:28 AM, Prasanna Kumar Nagasamudram wrote:

I have the following in the list.rhtml

.... .... <%= javascript_include_tag "prototype" %>

Autocompletion needs script.aculo.us as well:

<%= javascript_include_tag :defaults %>

– fxn

Wow that works, thanks a lot…

  • Prasanna