I have a form that has a set of buttons that i want to change the appearance of when they are clicked. I can do this by specifying the button name directly, but i'd like to be able to do it with dynamically. For example:

I can do this:

formObj.button1.value += "*";
formObj.button2.value += "*";


etc etc

But i want to do something like this (which doesn't work!)

whichbutton = "button" + bnumber;
formObj[whichbutton].value += "*";


I gues it doesn't work because i'm trying to specify an object with a standard variable, so how do i change it to make it work?

Cheers.