Ouwe rakker |
|
<script language="Javascript">
function checkAll(formId, controllerId) {
if (document.getElementById(controllerId).checked) {
var checkBox = true;
} else {
var checkBox = false;
}
for (var i = 0; i < document.getElementById(formId).elements.length; i++) {
document.getElementById(formId).elements[i].checked = checkBox;
}
return true;
}
</script>
<form id="inbox" action="" method="POST">
<input type="checkbox" name="message[]" id="message[]" value="1" /> Welcome to this messageboard<br />
<input type="checkbox" name="message[]" id="message[]" value="2" /> Hi there, can I ask a question?<br />
<input type="checkbox" name="message[]" id="message[]" value="3" /> Could you do me a favour?<br />
<input type="checkbox" name="message[]" id="message[]" value="4" /> My login info<br />
<input type="checkbox" name="message[]" id="message[]" value="5" /> Example script<br />
<input type="checkbox" name="message[]" id="message[]" value="6" /> Explain plz...<br />
<input type="checkbox" name="message[]" id="message[]" value="7" /> You are an idiot, you know that<br />
<input type="checkbox" name="message[]" id="message[]" value="8" /> Your account has been suspended<br />
</form>
<br />
<br />
<input type="checkbox" name="checkAllCont" id="checkAllCont" onClick="return checkAll('inbox', 'checkAllCont');"/> Check All
<script language="Javascript"> function checkAll(formId, controllerId) { if (document.getElementById(controllerId).checked) { var checkBox = true; } else { var checkBox = false; } for (var i = 0; i < document.getElementById(formId).elements.length; i++) { document.getElementById(formId).elements[i].checked = checkBox; } return true; } </script> <form id="inbox" action="" method="POST"> <input type="checkbox" name="message[]" id="message[]" value="1" /> Welcome to this messageboard<br /> <input type="checkbox" name="message[]" id="message[]" value="2" /> Hi there, can I ask a question?<br /> <input type="checkbox" name="message[]" id="message[]" value="3" /> Could you do me a favour?<br /> <input type="checkbox" name="message[]" id="message[]" value="4" /> My login info<br /> <input type="checkbox" name="message[]" id="message[]" value="5" /> Example script<br /> <input type="checkbox" name="message[]" id="message[]" value="6" /> Explain plz...<br /> <input type="checkbox" name="message[]" id="message[]" value="7" /> You are an idiot, you know that<br /> <input type="checkbox" name="message[]" id="message[]" value="8" /> Your account has been suspended<br /> </form> <br /> <br /> <input type="checkbox" name="checkAllCont" id="checkAllCont" onClick="return checkAll('inbox', 'checkAllCont');"/> Check All
|