I have a system that spits out the names of people. you can then check the box next to that name and they are added to a batch email list.
my checkbox is called LIST_ARRAY[] and the value is the persons id
<input type='checkbox' name='LIST_ARRAY[]' value='" . $row[ID] . "'>
this all works great except i want to add a javascript option which makes all the boxes checked. This is causing problems because i need to call the checkbox 'LIST_ARRAY[]' for it to work in php but javascript spits the dummy at the name because of the [] in it.
javascript:
<input type=button name="CheckAll" value="Select All" onClick="checkAll(document.searchres.LIST_ARRAY[])">
calls:
function checkAll(field)
{
for (i = 0; i < field.length; i++)
field.checked = true ;
}
if i call my checkboxes 'LIST_ARRAY' the js works fine but the PHP doesn't and so on.
anyone any ideas??
cheers,
nozom