Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Aaron http://www.stocad.com

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

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

Link to Remote Tag

Tag for creating ajax callback links

<%= link_to_remote( "click here",
                         :update => "specific_div_block",
                         :url =>{ :action => :action_name }) %>
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed