Hi.
What I basically want is to when a checkbox is ticked a input field
becomes enabled. Its working if i use a button onclick routine but has
no effect when i onclick the checkbox.
Any help greatly appreciated.
<script language="javascript">
function enableField() {
if (document.forms['customer'].f_name.checked=true)
document.forms['customer'].f_name_rename.disabled=false;
if (document.forms['customer'].f_name.checked=false)
document.forms['customer'].f_name_rename.disabled=true;
}
</script>
<?php echo $html->formTag('/invoicetemps/
setup/','post',array('name'=>'customer', 'id'=>'customer'));?>
<?php echo $html->checkboxTag("customer/
f_name",array("id"=>"f_name","onclick"=>"enableField()")); ?>
<?php echo $html->input("customer/f_name_rename",array("value"=>"First
Names","disabled"=>"disabled","id"=>"f_name_rename")); ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---