I''d like to have the onclick of a form element call a rails method. Such as: radio_button :model, :method, ''onclick'' => :railsMethod Otherwise, I''m going to have to do this outside the rails framework..the old fashioned way hehe. (I can''t get various rjs, observe_field, observe_form, etc attempts to work...if you''d like to take a stab go right ahead: http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/68dc8a4a70fc0f32) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
krunk- wrote:> I''d like to have the onclick of a form element call a rails method. > Such as: > > radio_button :model, :method, ''onclick'' => :railsMethod > > Otherwise, I''m going to have to do this outside the rails > framework..the old fashioned way hehe. > > (I can''t get various rjs, observe_field, observe_form, etc attempts to > work...if you''d like to take a stab go right ahead: > http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/68dc8a4a70fc0f32) > > > > > >Hey You can look at remote_function Quoted from the RDoc : <select id="options" onchange="<%= remote_function(:update => "options", :url => { :action => :update_options }) %>"> <option value="0">Hello</option> <option value="1">World</option> </select> Hope this helps Cheery-o Gustav Paul gustav-PUm+PnBUKx7YkQIYctQFYw@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
krunk- wrote:> radio_button :model, :method, ''onclick'' => :railsMethodWhat about radio_button :model, :method, :onclick => remote_function(:controller => ''some'', :action => ''action'') Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks alot! Just what the doctor ordered --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---