method

remote_function

remote_function(options)
public

Returns the javascript needed for a remote function. Takes the same arguments as link_to_remote.

Example:

  <select id="options" onchange="<%= remote_function(:update => "options", :url => { :action => :update_options }) %>">
    <option value="0">Hello</option>
    <option value="1">World</option>
  </select>