Generally, for a check box to have much use in asp and other server side code, it has a name that holds its value when the form that contains it is submitted.
If the 'parent' check box in question is truly in a unique parentNode of these 'child' check boxes (and depending upon the organization of things, the parentNode could be the parentNode of other sets of children) , you could try:
Code:
parentNode.getElementsByName('the_name')[0]
For example, let's say your child check box is represented by the variable ch, and you wanted to check the 'parent' check box with a name of master1:
Code:
ch.parentNode.getElementsByName('master1')[0].checked=1;
If there isn't already a name for this check box, it would be better to give it a unique (id's must be unique on a given page) id, or use the one it has if it has one. Then the code gets much simpler, as no reference to the child or any aspects of the document's structure are needed:
Code:
document.getElementById('the_id').checked=1;
There are also ways to 'walk' the structure of a form (as opposed to the actual document tree) in javascript. This might be more useful in your case, it all depends on the markup you are dealing with.
Bookmarks