bjblackmore
Programmer
Hi,
Does anyone know how to modify this javascript so that it will recognise checkboxs called checkbox[0], checkbox[1], checkbox[2]...etc so my php script will work.
<SCRIPT LANGUAGE="JavaScript">
var checkflag = "false";
function check(field) {
if (checkflag == "false" {
for (i = 0; i < field.length; i++) {
field.checked = true;}
checkflag = "true"; }
else {
for (i = 0; i < field.length; i++) {
field.checked = false; }
checkflag = "false"; }
}
</script>
Cheers
Ben
Does anyone know how to modify this javascript so that it will recognise checkboxs called checkbox[0], checkbox[1], checkbox[2]...etc so my php script will work.
<SCRIPT LANGUAGE="JavaScript">
var checkflag = "false";
function check(field) {
if (checkflag == "false" {
for (i = 0; i < field.length; i++) {
field.checked = true;}
checkflag = "true"; }
else {
for (i = 0; i < field.length; i++) {
field.checked = false; }
checkflag = "false"; }
}
</script>
Cheers
Ben