Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify Javascript for PHP array

Status
Not open for further replies.

bjblackmore

Programmer
Jul 10, 2002
5
GB
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=&quot;JavaScript&quot;>
var checkflag = &quot;false&quot;;
function check(field) {
if (checkflag == &quot;false&quot;) {
for (i = 0; i < field.length; i++) {
field.checked = true;}
checkflag = &quot;true&quot;; }
else {
for (i = 0; i < field.length; i++) {
field.checked = false; }
checkflag = &quot;false&quot;; }
}
</script>

Cheers
Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top