need to enable a button if the checkbox is enabled using javascript in aspx page. Here is my code in aspx page. Please Help !
<script type="text/javascript">
function checkButt(obj) {
alert("Inside the function");
document.getElementById('<%=btnLoadForm.ClientID%>').disabled = !obj.checked;
}
Instead of:
You could try removing the
disabledproperty from the element (add your logic as needed):Where
disabledis a Boolean attribute, the value doesn’t make much of a difference. You can read more on this in a similar post: HTML – Why boolean attributes do not have boolean value?UPDATE:
You would need logic around the
removeAttributestatement. Something similar to:This would enable
document.getElementById('<%=btnLoadForm.ClientID%>')ifobj.checkedis checked.