Radio button with observer field
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> <TD nowrap><B><%=pm.name%></B></TD> <TD><%=pm.description%></TD> </TR> <%}%> <% observe_field('payment_method_token', :frequency => 0.5, :with => "payment_method_token", :url => { :action => 'load_payment_method' }) %>