I have a radio button
<input type="radio" name="shipadd" value="1" id="shipadd" />
When I do this -
alert(document.thisform.shipadd.length); I get my value undefined.
But when I have 2 radio buttons with the same name I get value as 2.
Why is this happening? Shouldn't the value with one radio button be 1.
Because the value is "undefined" a simple for loop doesn't work for me.
for (counter = 0; counter < document.thisform.shipadd.length; counter++)
Any help would be great.Thanks guys.
<input type="radio" name="shipadd" value="1" id="shipadd" />
When I do this -
alert(document.thisform.shipadd.length); I get my value undefined.
But when I have 2 radio buttons with the same name I get value as 2.
Why is this happening? Shouldn't the value with one radio button be 1.
Because the value is "undefined" a simple for loop doesn't work for me.
for (counter = 0; counter < document.thisform.shipadd.length; counter++)
Any help would be great.Thanks guys.