jquery - Converting form_remote_tag to form_for for Rails 3 UJS -


i'm trying convert rails 3

<%= form_remote_tag :url => feedback_url,    :update    => 'flash_message',    :before    => "dosomething()",    :condition => "condition()",    :complete  => "dosomethingelse();" -%> 

here's have far

<%= form_tag feedback_url, :remote => true, :id => 'form' %>   <%# gather data %> <% end -%> <script>     $(function() {        $("#form").bind("ajax:beforesend", function() {           dosomething();            }).bind("ajax:success", function() {           dosmomethingelse();         });       });        }); </script>  

i found post you. sure solve http://www.alfajango.com/blog/rails-3-remote-links-and-forms/


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -