On 17 April 2012 13:35, Draiken <luiz.felipe...@gmail.com> wrote: > I think you're just not adding the callback before the submit. > > When you submit and you don't have the callback set, the callback will > obviously never get called. > > Try this: > $(document).on "click", "#document_template_session_btn", -> > $("#document_template_session_frm").on 'ajax:success', -> > $("#invite_frm").submit() > $("#document_template_session_frm").submit()
I've tried this: $(document).on "click", "#document_template_session_btn", -> $("#document_template_session_frm").submit() $("#document_template_session_frm").on 'ajax:success', -> $("#invite_frm").submit() It seems to work well now. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.