I'm using $rails.handleRemote to run remote calls on dynamically created remote links.
However, even though I attach these links to the document, none of the events ajax:complete, ajax:success, ajax:error are fired.
My controller returned javascript and updated the page accordingly but I changed it to return html content it so I can better handle user input errors and so on in the ajax:success and suchlike events.
I'm using $rails.handleRemote to run remote calls on dynamically created remote links. However, even though I attach these links to the document, none of the events ajax:complete, ajax:success, ajax:error are fired. My controller returned javascript and updated the page accordingly but I changed it to return html content it so I can better handle user input errors and so on in the ajax:success and suchlike events.
I tried adding
but nothing shows up.
No javascript errors are shown on the console either.
During debugging I have seen the line is run, but the event is not fired!
Any tip to narrow down the problem?