Alex Duffield wrote:
> I have 2 radio boxes in a form. They are in a group (same name) so that
> only one can be checked..
> 
> How can I check and change witch one is checked via JS..

$F doesn't use the input's name, but rather it's id. Remember, it's really just
a shortcut for $('foo').input.value.

Right now, $F doesn't do value assignment, so I'd drop it. Go with something 
like:

if( form.elements['input_name'].value == 'foo' ) {
  form.elements['input_name'].value = 'bar';
} else {
  form.elements['input_name'].value = 'foo';
}

-- 
Michael Peters
Developer
Plus Three, LP


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to