I'm trying to convert this for Rails 3
<%= form_remote_tag :url => feedback_url,
:update => 'flash_message',
:before => "doSomething()",
:condition => "condition()",
:complete => "doSomethingElse();" -%>
Here's what I have so far
<%= form_tag feedback_url, :remote => true, :id => 'form' do %>
<%# Gather data %>
<% end -%>
<script>
$(function() {
$("#form").bind("ajax:beforeSend", function() {
doSomething();
}).bind("ajax:success", function() {
doSmomethingElse();
});
});
});
</script>
I found this post for you. I am sure that you will solve https://web.archive.org/web/20201109001755/https://www.alfajango.com/blog/rails-3-remote-links-and-forms/