Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  8] [ 4]  / answers: 1 / hits: 39032  / 14 Years ago, tue, june 1, 2010, 12:00:00

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.


More From » javascript

 Answers
303
<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>

[#96628] Thursday, May 27, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zariahdiamondz

Total Points: 649
Total Questions: 109
Total Answers: 88

Location: Tajikistan
Member since Thu, Apr 14, 2022
2 Years ago
;