Skip to content Skip to sidebar Skip to footer

Rails: Remote Form In A Partial: Works Once , Not Twice

I've been confronted to a problem this last days. I want to update an object using a remote form. I can basically update my object when I submit my form the first time, but it does

Solution 1:

For First time the javascript is freshly loading in your page. So it will work. Next time your javascript is not working means you may be added your script code inside document.ready.......

For this issue you have two solutions:

  1. You need to call javascript files once again on each update time.
  2. You Specify your update calls in particular javascript function and you must call that javascript function on each update fires in your page.

Post a Comment for "Rails: Remote Form In A Partial: Works Once , Not Twice"