I am acheiving this via postback but that is adding a delay at my server so I want to handle this on the client side. Can anyone guide me how to disable one combobox on the clientside event of another combobox.
I have done so far:
function Enable() {
alert("gfugsdugfsduigf");
var ddl3 = document.getElementById("Cmbx1");
var ddlValue3 = ddl3.options[ddl3.selectedIndex].value;
if (ddlValue3 == "1") {
document.getElementById('<%=Cmbx2.ClientID%>').disabled = false;
}
else {
document.getElementById('<%=Cmbx2.ClientID%>').disabled = true;
}
}
In the page load I am writing:
Cmbx1.Attributes.Add("onChange", "Enable();");
But No success, even the control is not going to the function when I debug.