This is a clip of a radio button that updates a field with ajax on changes.
<%= radio_button_tag "payment_method_token", pm.token, (@payment_method_token == pm.token ? true : false), {:onchange => remote_function( :with => "'payment_method_token='+this.value", :url => {:action => 'load_payment_method' } )}%>
>
<TD nowrap><B><%=pm.name%>
<%=pm.description%> | >
TR>
<%}%>
<% observe_field('payment_method_token', :frequency => 0.5,
:with => "payment_method_token",
:url => { :action => 'load_payment_method' })
%>