dresden_phoenix — 2012-03-02T22:38:41-05:00 — #1
I am having a brain f@rt, or maybe a code related pre-senior moment.
I thought a radio button set had a js property, similar to selectedIndex of a dropdown list that would allow you to easily retrieve the value of a checked button.
I know how to do this in jQuery via ":button :checked", or in js with a foreach loop to iterate through the button elements an attaching an event listener to each one. Which is fine it just seems convoluted if there was already a native way of doing this. Have I really forgotten something or am I just dreaming?
paul_wilkins — 2012-03-03T06:22:21-05:00 — #2
I don't think that you've forgotten anything. It could be a useful scripting behaviour to have, but there doesn't seem to be anything built in that lets you retrieve the value of the currently selected radio button.
dresden_phoenix — 2012-03-03T18:19:04-05:00 — #3
Thanks Paul_W. My neurons must have been tangled.
system — 2014-10-07T22:03:12-04:00 — #4
This topic is now closed. New replies are no longer allowed.