views:

53

answers:

1

Hey,

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

+1  A: 

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

doctororange