Forum: Ruby on Rails Passing parameters to 'remote_function'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Juanma (Guest)
on 2006-06-12 13:57
Hi,
I am trying to use the 'remote_function' helper method from the
PrototypeHelper class on a the onblur event of a text_field for filling
a form with data via AJAX.

How can I get the value of the text_field for making a query to the
database in the controller action?

<%= text_field("item", "code" ,
   :onblur => remote_function(:update => 'mydiv',
                              :url =>{:action => 'my_action'})
%>

Is there something like the :with of a observe_field to specify the
parameters for the XMLHttpRequest?

Thanks
This topic is locked and can not be replied to.