Prasanna Kumar Nagasamudram
2007-Feb-20 10:28 UTC
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 .. <HEAD> .... .... <%= javascript_include_tag "prototype" %> .... .... </HEAD> <BODY> .... .... 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 20, 2007, at 11:28 AM, Prasanna Kumar Nagasamudram wrote:> 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 > > .. > <HEAD> > .... > .... > <%= javascript_include_tag "prototype" %>Autocompletion needs script.aculo.us as well: <%= javascript_include_tag :defaults %> -- fxn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Prasanna Kumar Nagasamudram
2007-Feb-20 11:04 UTC
Re: Problem using auto_complete text field....
Xavier Noria wrote:> On Feb 20, 2007, at 11:28 AM, Prasanna Kumar Nagasamudram wrote: > >> I have the following in the list.rhtml >> >> .. >> <HEAD> >> .... >> .... >> <%= javascript_include_tag "prototype" %> > > Autocompletion needs script.aculo.us as well: > > <%= javascript_include_tag :defaults %> > > -- fxnWow that works, thanks a lot.... - Prasanna -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---