JavaScript to enable/disable textbox on checkbox checked/unchecked.
In many application you might be needed to enable/disable the text box property based on certain condition. For example in many web site you might be seen based on check box selection their is changes in text box enable/disable property.
Other City : <input type="checkbox" id="chkbxType" onclick="getCheckfDesc();" />
<input type="text" id="CheckDesc" disabled="disabled" /></td>
function getCheckfDesc()
{
var i = document.getElementById("chkbxType").checked;
document.getElementById("CheckDesc").disabled = !i;
}