I have a HTML form that uses a checkboxes in a table. The form calls a stored procedure. When the user checks all the checkboxes the procedure works fine. If not, the procedure does not work because the HTML form is not passing anything for the checkbox. I tried the code below, but it doesn't help. Any suggestions?
<script language="Javascript">
function checkFunction(obj) {
if (obj.checked) {
obj.value = "on";
}
else {
obj.value = "off";
}
}
</script>
<input type="checkbox" name="p_drop_class" onclick="checkFunction(this)" value="off">
<script language="Javascript">
function checkFunction(obj) {
if (obj.checked) {
obj.value = "on";
}
else {
obj.value = "off";
}
}
</script>
<input type="checkbox" name="p_drop_class" onclick="checkFunction(this)" value="off">