How to execute JS function before AJAX request using remote_form_for
Before my form initiates an AJAX request, I want to call a function.
I see that there is a convenience for link_ to_remote: before the parameter ... "Called before the request."
here is my source:
<% form_remote_for(@news, :url => {:action => 'create'}) do |f| %>
Before initiating a request, I want to call myFunction ()
Thanks for the help:)
+1
a source to share