Hello all, My apology in advance if this question has be asked many times already. I am new to Rails and can''t get the following simple Ajax work: <% form_remote_tag :url => { :action => :add, :id => product } do %> <%= submit_tag "Add" %> <% end %> I tried to test it by making "add" method to print something, but no response. Meanwhile the old button_to method works. <% button_to "Add", :action => :add, :id => product %> Nothing particular in development log. And yes, I put <%= javascript_include_tag :defaults %> in the layout file. I am on OS X Leopard with Rails 1.2.6. Any idea? Thanks. Sy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
could you post what you have in your controller and rjs? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I restarted the rails and it seems to work! Thanks. On Jan 5, 4:57 am, Sy <mapobri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > My apology in advance if this question has be asked many times > already. I am new to Rails and can''t get the following simpleAjax > work: > > <% form_remote_tag :url => { :action => :add, :id => product } do %> > <%= submit_tag "Add" %> > <% end %> > > I tried to test it by making "add" method to print something, but no > response. Meanwhile the old button_to method works. > > <% button_to "Add", :action => :add, :id => product %> > > Nothing particular in development log. And yes, I put > <%= javascript_include_tag :defaults %> in the layout file. > > I am on OS X Leopard with Rails 1.2.6. Any idea? > Thanks. > > Sy--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---