Posts

Showing posts from April 6, 2009

Tips for Enabling/Disabling ASP.NET Checkbox using Javascript

When we use a ASP.NET checkbox and by default keep it disabled. If you see the view we will notice as seen below < span disabled='disabled' > < input type='checkbox' disabled='disabled' > Now if we say document.getElementById("chktest").disabled = false; . This will not work. The workaround is document.getElementById("chktest").disabled = false; document.getElementById("chktest").parentNode.disabled = false; Cheers!!!