<form ... name=s>
<input type="checkbox" name="i" ....>
<a href="#" onClick="Javascript:invert_checkbox('s','i');return false;">
function invert_checkbox (form_name, checkbox_name){
element = document.forms[form_name].elements;
for (i=0; i < element.length; i++) {
if (element[i].name == checkbox_name){
if(element[i].checked == true) {
element[i].checked = false;
} else {
element[i].checked = true;
}
}
}
}
|