Take the 2-minute tour ×

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 :)

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

My mistake - :before does work with remote_ form_for. I just had a silly syntax error.

share|improve this answer
add comment

Your Answer


