Question : Moo Tools to Uncheck a Radio Button

I am trying to uncheck a radio button using javascript.

It works if I do the following
1:
document.myFormName.myRadioName[0].checked = false;

But I would like to use a variable instead having to specify the name.  The following code is what I'm trying, but I can't get the syntax correct.  
1:
2:
var myVariable = 'myRadioName';
document.myFormName.eval(myVariable)[0].checked = false.


P.S.  If there is a way to do this with mootools, that would be even better.

Thanks,
Julie

Answer : Moo Tools to Uncheck a Radio Button

Random Solutions  
 
programming4us programming4us