I have a form and a ul and the form is submitting a new li for the unordered list. It puts the right info into the MySQL database, but it won''t insert properly into the list. Also, the link to show the form stops working and it just says [object XMLHttpRequest] where the form used to be and the unordered list is unchanged. The view: http://pastie.caboo.se/83457.txt (Pastie, for some odd reason, repeated some commas and >''s (like ,,,,, instead of , and =>>>>>>>> instead of =>, hence the link to the txt version). The method: http://pastie.caboo.se/83459 The partial used in add_todo_item: <li><%= link_to @item.name, :action => ''todo_item'', :id => @item %></li> The javascript update function: http://pastie.caboo.se/83461 I really have no idea what is wrong and trying to use Firebug in Firefox (I generally use Camino) is useless because it ignores using Ajax and tries actually going to a page. Thanks in advanced. -- 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 -~----------~----~----~----~------~----~------~--~---
Try looking at link_to_remote link_to_remote @item_name, :url => { :action => ''todo_item'', :id => @item }, :update => ''your_list'' Im new to the ruby world myself, but, unless I''m mistaken, link_to renders an entirly new page while link_to_remote works with the Ajax functionality to render just a specific part in the page. The :update attribute tells link_to_remote what part of the page, with that id, you are updating. Hope this helps, ~S -- 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 -~----------~----~----~----~------~----~------~--~---
I''m so dumb, I had TWO things with the id of "todo" (I forgot I had some header stuff). It works now. -- 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 -~----------~----~----~----~------~----~------~--~---