<html>
<script type="text/javascript">
function do_stuff(node, hooks) {
// Loop through the hooks
for (i=0;hook = hooks[i]; i++) {
// Find the relevant checkbox
id = 'chkHook-' + hook;
checkbox = document.getElementById(id);
// Set the checkbox status to the status of the clicked one
checkbox.checked = node.checked;
}
}
</script>
<input type="checkbox" onclick="do_stuff(this, ['node_info', 'insert', 'update', 'load'])" /> custom node type
<br /><br /><br />
<input type="checkbox" id="chkHook-node_info" /> node_info<br />
<input type="checkbox" id="chkHook-insert" /> insert<br />
<input type="checkbox" id="chkHook-update" /> update<br />
<input type="checkbox" id="chkHook-load" /> load
</html>