I wrote up something similar here:
http://lindsaar.net/2008/2/25/javascript-field-monitor
This is a javascript file that monitors every input and select on a
form and highlights it if it changes.
You can replace the highlight code with an AJAX call if you want.
Regards
Mikel
VIEW:
<%= select_tag :card_type, %{<option value="">Please Select...</option>}
+
options_for_select(supported_card_types) %>
<%= observe_field :card_type,
:frequency => 0.5,
:url => {:action => :display_card_fields, :only_path
=> :false},
:with => "'card_type='+encodeURIComponent(value)" %>
This calls RJS file "display_card_fields.js.rjs" when the select box
changes, sending the value card_type in the params hash.
Hope this helps you :)