I suspect you probably want to get the radio *group* by name, and then
see which (if any) of its members is currently checked.
$$('input[name="yourRadioGroup"]:checked').first() will get the
element or false. To explicitly get the value, try this:
var myValue = ($$("input[name="yourRadioGroup"]:checked").first()) ?
$$("input[name="yourRadioGroup"]:checked").first().getValue() : '';
Walter
On Jul 30, 2009, at 4:07 PM, mr_justin wrote:
>
> The value is returned from radio buttons and checkboxes if the item is
> checked/selected. This behavior mimics browser behavior when these
> fields are submitted via a traditional form submit.
>
> If $F() returns null for a checkbox or radio button, then that item is
> not selected and it's value should be treated as such.
>
> -justin
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---