Forum: Ruby on Rails Passing parameters to 'remote_function'

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Juanma (Guest)
on 2006-06-12 13:57
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?

This topic is locked and can not be replied to.