Re: [Rails] Re: ajax:success seems not respond.
On 17 April 2012 13:35, Draiken <luiz.felipe.gp@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home