Hi,
How to disable/enable TextBox control on runtime from javascript?
I have change event applied to DropDownList and want to enable/disable TextBox depends on value from DropDownList.
Code example:
function DropDownListOnChange() {
var listObj = document.getElementById('drop_down').ej2_instances[0];
var value = listObj.value; var textBoxObj = document.getElementById('text_box').ej2_instances[0];
if( value == 1) { // how to disable TextBox element ???
textBoxObj.disable(); // <- this don't work
} else {
textBoxObj.enable(); // <- this don't work
}
}