How can I enable the textbox when the checkbox is checked in JavaScript:
Can someone please show me how to do it correct please! this is my code:
function checkLevelZone() {
var txtOffSite = $find("<%=txtOffSite.ClientID %>");
var checkbox = $find("<%=OffSiteCheck.ClientID %>");
if (checkbox.checked) {
txtOffSite.removeAttribute('Enabled');
} else {
txtOffSite.disabled = true;
}
}
asp:
<telerik:RadButton ID="OffSiteCheck" runat="server" ToggleType="CheckBox" ButtonType="ToggleButton" OnClientCheckedChanged="checkLevelZone" Skin="Windows7"></telerik:RadButton>
<telerik:RadTextBox ID="txtOffSite" runat="server" Enabled="false"> </telerik:RadTextBox>
Use this: