Monthly Archive: March 2011

Mar
15

Get the value of radio buttons with Prototype

In the Prototype javascript library, there’s a utility function, $F, which gets value of a form control.  It doesn’t work quite so well for Radio Buttons. The following code does not work: <input type=”radio” name=”myRadio” value=”one”/> <input type=”radio” name=”myRadio” value=”two”/> <input type=”radio” name=”myRadio” value=”three”/> <input type=”button” onclick=”alert($F(‘myRadio’))”/> I created another function which gets you the …

Continue reading »