Here is the code for auto complete from Scriptaculous <http://script.aculo.us/> # view Just a little test: <%= text_field_with_auto_complete :contact, :name %> # controller auto_complete_for :contact, :name Can some one explain the controller part. I have a table named ''contacts'' and a column in the table called ''name'' I have generated the default scaffold code and added the controller code in my contacts controller and view code in my _forms.html. Autocomplete doesn''t work. What am I doing wrong?? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Silly question, but did you include prototype.js in you layout (and controls.je maybe)? GeekEntrepreneu wrote:> Here is the code for auto complete from Scriptaculous > <http://script.aculo.us/> > >|# view| > >|Just a little test:| > >|<%= text_field_with_auto_complete :contact, :name %>| > >| | > >|# controller| > >|auto_complete_for :contact, :name| > >| | > >|Can some one explain the controller part. I have a table named ‘contacts’ and a column in the table called ‘name’| > >|I have generated the default scaffold code and added the controller code in my contacts controller and view code in my | > >|_forms.html. Autocomplete doesn’t work. What am I doing wrong??| > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
Yes, included both in the <Head> section in the layout -----Original Message----- From: Jos [mailto:jos-opYYzZorcyRWk0Htik3J/w@public.gmane.org] Sent: Saturday, October 15, 2005 12:41 AM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org; geekentrepreneur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Subject: Re: [Rails] AJAX- autocomplete question - Silly question, but did you include prototype.js in you layout (and controls.je maybe)? GeekEntrepreneu wrote:> Here is the code for auto complete from Scriptaculous > <http://script.aculo.us/> > >|# view| > >|Just a little test:| > >|<%= text_field_with_auto_complete :contact, :name %>| > >| | > >|# controller| > >|auto_complete_for :contact, :name| > >| | > >|Can some one explain the controller part. I have a table named ''contacts''and a column in the table called ''name''|> >|I have generated the default scaffold code and added the controller codein my contacts controller and view code in my |> >|_forms.html. Autocomplete doesn''t work. What am I doing wrong??| > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >