Reputation: 11810
Before my form initiates an AJAX request, I want to call a function.
I see that for link_ to_remote there is the handy :before option... "Called before request is initiated."
here is my source:
<% form_remote_for(@news, :url => {:action => 'create'}) do |f| %>
Before the request is initiated, I want to call myFunction()
Thanks for the help :)
Upvotes: 1
Views: 194
Reputation: 11810
My mistake - :before does work with remote_ form_for. I just had a silly syntax error.
Upvotes: 1