Hi, i need to post a form using AJAX so that I can update and save my object:
form: <% form_for(@sample,:html => {:id => "analyses_list"}) do %> <b>Analyses:</b> <ul id="params_list"> <%= render :partial => 'parameters/parameter_name', :collection => @parameters %> </ul> <% end %> if I am using link_to_function in order to post the form, everything is alright except that it's not an AJAX request, but at least the action update is called: link: <%= link_to_function("Remove an analysis from sample # [EMAIL PROTECTED]", "if (confirm('Are you sure you want to remove those analyses?')) $ ('analyses_list').submit();") %> I try using link to remote, but i have a problem with the url parameter, i cant get the link to send the request to the update action. <%= link_to_remote "Remove analyses from sample" ,{:url => {:action => 'update', :id =>@sample}}, {:confirmation => true,:submit => 'analyses_list'} %> i also tried {:url => sample_url(@sample), :method => :put} --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---