Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting the ajax:remotipartComplete event #198

Open
glappen opened this issue May 17, 2018 · 0 comments
Open

Not getting the ajax:remotipartComplete event #198

glappen opened this issue May 17, 2018 · 0 comments

Comments

@glappen
Copy link

glappen commented May 17, 2018

Hello,

I am trying this on latest version of Rails 5 (I just found out it was supported, so I got pretty far despite that!).

I am not getting the ajax:remotipartComplete event though when l listen for it like this:

 $('body').on('ajax:remotipartComplete', '.edit_question', function(e, data) {                                                                                                                                   
     $(window.activeQuestionDiv).replaceWith(data);                                                                                                                                                                
     $('#question-modal').modal('hide');                                                                                                                                                                           
  });

I set breakpoing in jquery.remotipart.js and this line does execute:

$.rails.fire(form, 'ajax:remotipartComplete', [data]);

But I can never receive that event, even if I register a listener directly on the form. Any ideas why? Getting ready to give up and resort to writing my own js to use FormData...thanks!

Greg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant