Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

uncheck checkbox when another is checked 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>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #uncheck #checkbox #checked #javascript
ADD COMMENT
Topic
Name
9+2 =