I have a checkbox Birthdate which shows the mm/dd only.And below it there is another checkbox called ShowYear which shows the year and this checkbox is only visible if the Bithdate checkbox is checked.
Now I want to uncheck the ShowYear checkbox automatically if the Birthdate checkbox is unchecked through javascript.
<input id="cbxBirthDate" type="checkbox" onClick="javascript:uncheckShowYear(this);" />
<input id="cbxShowYear" type="checkbox" />
<script language="javascript" type="text/javascript">
function uncheckShowYear(obj)
{
if (obj.checked == false)
{
document.getElementById("cbxShowYear").checked = false;
}
}
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With