Never been to DZone Snippets 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

About this user

matt http://www.elleandergrey.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Ajax style radio buttons

Ajax radio buttons. update the page div when a radio button is pressed.

<div id="join">
        <p class="title">
      Sign-up
        </p>
   <% form_for :radio_join, :html => { :id => 'radio_join' } do %>
      <%= radio_button_tag :join_page, :member %> Member
      <%= radio_button_tag :join_page, :model %> Model
      <%= radio_button_tag :join_page, :photographer %> Photographer
    <% end -%>
<% form_for :user, @user, :url => {:action => 'save_free'} do |user_form| -%>
        <div class="info">
    <%= render :partial => 'common/user_form', :object => user_form %>
                <p class="alignright">
        <%= submit_tag 'JOIN', :class => 'inputSubmit' %>
                </p>
      <br />
      <br />
        </div>
  <% end -%>

     </div>
<%= observe_form :radio_join, :url => { :action => 'choose_page' }, :update => "join", :complete => "Element.show('join')", :frequency => "0.25" %>
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS