That's the reason I tend to use radio buttons only in an abstracted fashion with a 'radioGroup' class I wrote. It tidies up all of those awful semantics. Perhaps this is the best approach to dealing with the problem...

On 15/01/10 01:27, Aaron Newton wrote:
Clientcide has a getValue method that is a mess. When 1.2 deprecated this functionality I went to recreate it and make it better so that you could use it on radio buttons, for example. But radio buttons are a bizarre thing. If I do myRadioElement2.getValue() but a different radio than the element I just called the method is the selected one, what do you return? The value property of myRadioElement2 ? Or the value of the other radio button that is selected?

See what I mean?

On Thu, Jan 14, 2010 at 6:43 AM, Thomas Aylott <[email protected] <mailto:[email protected]>> wrote:

    One thing that came up on IRC yesterday was the need to be able to
    get the values of a form.
    Specifically someone wanted to get the value of the selected radio
    element.

    Is there anything in more or clientcide that’ll let you get a
    hash/object view of the data of a form similar to how
    form.toQueryString() works?

    I think in 2.0 there’s both serialize and toQueryString.
    toQueryString should call serialize.
    Then you’d be able to call serialize yourself and just look at the
    specific value you need.

    Maybe this could/should be a plugin on the forge?

    — Thomas Aylott
    SubtleGradient
    MooTools




--
Not sent from my iPhone.

Reply via email to