I have a form (id="myForm") whose checkbox ("checkbox") I check/uncheck as follows:
document.forms['myForm'].checkbox.checked = false;
How can I do this dynamically? I.e. have a function where I pass in the name of the checkbox and then check or uncheck it?
function check(name) {
document.forms['myForm'].**name**.checked = false; // how can I do this right?
}