Perhaps it is very basic, but I have some issue with the radios.length property. I have some input like so :
<input type="radio" name="name1" value="test1" checked='checked'/><br />
<input type="radio" name="name2" value="test2" checked='checked'/><br />
When I alert the radios.length property, I always have 0 as an answer. Could someone explain why ?
radios.length is not a valid property in the DOM..
You need to find those(which are input in this case) and then use the length property on it ..
UPDATE
To Select only the Radio buttons you can do this
Check Fiddle
Also if you are using jQuery do not forget to encase your script in DOM Ready handler
jQuery
jQuery Fiddle