John Butler | 18 May 12:19

Re: radio button observe field only triggers once


AndyV wrote:
> If I remember correctly, I think you'll need an id on each radio
> button and need to observe each radio button individually.  The
> 'grouping' of the radio buttons into a single field value that's
> posted back does not replace the fact that it's actually a collection
> of individual html elements on the form.
> 
> On May 16, 4:07 pm, John Butler <rails-mailing-l...@...>

Ye ive tried adding an observer to each individual radio button but the 
same thing happens.

<%= observe_field('test_yes',
                  :on => 'click',
                  :function => "alert('Element Yes changed')"%>

<%= observe_field('test_no',
                  :on => 'click',
                  :function => "alert('Element Yes changed')"%>

Im just going to have to post the whole form back and find out which one 
is set to 1 and do it that way.

--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane