Feb 16, 2007 - 04:58 AM
var rad = document.getElementById(radiobutton);
for (i = 0; i < rad.length; i++)
// Perform appropriate test and then use
rad[i].checked = true;
That should check the radio button you're expecting.
I hope this helps,
Feb 16, 2007 - 05:34 AM
Actually I just needed this part:
buttonElement.checked = true
...as I already knew (by Id) which button I wanted to select.
You've answered my question, but I was wondering about your example... it seems to rely on document.getElementById to return an array... Is that correct?
Well, thanks anyway, i'll give you the points.
Mar 18, 2009 - 08:05 AM