I think it would be neat to make things got from database search to appear one at a time using ajax and visual effects. The problem naturally meets a beginner when it is time to implement this "great" idea. I have a form using "form_remote_tag" and ofcourse "text_field_tag" and "submit_tag". I am currently able to render the results from the search controller using "render :partial" , but it does not satisfy my needs :] How is it possible(or is it?) to get these results appear on by one to a certain div-element? Thanks, Patrik Nisen -- Posted via http://www.ruby-forum.com/.
Anatol Pomozov
2005-Nov-21 19:59 UTC
Re: Getting things to appear one at a time with ajax.
I am not sure that I understood your question correctly, but If you want to put result of request into div element then you should use :update parameter of form_remote_tag something like this <%= form_remote_tag :update => "updated_div", :url => {:action => "add_comment"} %> See docs of form_remote_tag for more info. On 11/21/05, Patrik Nisen <pnisen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I think it would be neat to make things got from database search to > appear one at a time using ajax and visual effects. The problem > naturally meets a beginner when it is time to implement this "great" > idea. > > I have a form using "form_remote_tag" and ofcourse "text_field_tag" and > "submit_tag". I am currently able to render the results from the search > controller using "render :partial" , but it does not satisfy my needs :] > > How is it possible(or is it?) to get these results appear on by one to a > certain div-element? > > Thanks, > Patrik Nisen > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- anatol (http://pomozov.info) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Thanks for your response. Yes, thats what i am doing. "action" is the search controller, which locates stuff from the database using @params. Then i would like to put the the search results to my div ("updated_div" in this case) so that they appear one by one using visual effects. Is this possible possible? -- Posted via http://www.ruby-forum.com/.