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.
Who is Participating?
BenMorelConnect With a Mentor Commented:
Maybe just :
eval('$(objid)').checked = false; // without [0]
Or :
obj.checked = false; // may be simpler in your case :)
the simplest way to reset all the checkboxes depends on your layout.

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('ckb' + i).checked = false;

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;
headjavaAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.