My form has 3 radio buttons, <input type="radio" name="type" value="Systems" checked/> systems <input type="radio" name="type" value="machines" /> Machines <input type="radio" name="type" value="Misc" /> Misc
I am trying to get the value of the checked checkbox. I just wrote, function go() { alert("h"); if(formname.type.checked) alert("yes"); }
This is not doing anything Also, if I say alert(formname.type.checked) it gives me undefined. What am I missing here ?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15003
posted
0
they are arrays document.formName.type[0].checked document.formName.type[1].checked document.formName.type[2].checked