Passing values selected with onchange remote_function

How do i pass the value selected from a drop down selection and then extract it in rjs

<% select("what", "hello", @selection, {}, {:onchange => remote_function(:url => "test", :my_variable => "hello again") } ) %>

thanks.

Like this:

<%= observe_field :html_id_of_select, :url => {:action => "test" }, :with => 'variable_name' %>