headjava
asked on
Reseting a checkbox using a dynamic variable
I have a list of unrelated checkboxes (each has own name and id). When the user clicks any one the CB's I combine the value of a textarea and the value of the CB and replace the combine value back into the current textarea. Works fine. Now I want to clear the check from the CB. I'm sure there is something simple I've overlooked. Thanks for any suggestions.
checkbox.txt
checkbox.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
a few thoughts.
If you append all your check boxs with spacific prefix and increment a number you could do some thing like:
for(var i = 0; i < [how ever many CB's you have]; i++)
document.getElementById('c
another option would be to group all the CBs in a table or div. then you could loop through rows or childNode[x] to reset checked to false;