How can I add a javascript onclick event on a form input with multiple
checkbox?
I'm trying to do this using the following code..
<?php
echo $form->input('Role',
array('type'=>'select',
'multiple'=>'checkbox',
'options'=>$roles,
'label'=>'Roles:',
'onClick'=>'showTierDiv(this)'));
?>
However, when I view the source of the generated page using a browser,
I can see
that the onclick event "showTierDiv" was not included.
I also tried adding an onclick event using a form input with a
"single" checkbox and it works.
Here is the code:
<?php echo $form->input('tier',array
('label'=>'Tier','type'=>'checkbox', 'onclick'=>"showDiv(this)")); ?>
Is there any way to add onclick event on a form input with multiple
checkbox?
If none, are there any workarounds for this?
Thanks,
Mario
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment