I have a scenario where on checking a main checkbox, all the other
checkboxes should be checked
eg:
main checkbox: $form->checkbox('main',array('onClick' => 'check()'))
other checkboxes:
$form->checkbox('users',array('id'=> $value['User']['id']))
javascript:
function check()
{
if(document.getElementById('main').checked == 1)
{
//alert("main is checked");
// check all the other checkboxes
}
}
My problem is, how to get refrence to the other checkboxes.
any help wld be appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---