|
function disable()
{
$("#test1").ejDropDownList("disable");
$("#test2").ejNumericTextbox("disable");
} |
|
function disable() {
var controlClassName = ['e-numerictextbox', 'e-dropdownlist', 'e-datepicker', 'e-maskedit'];
for (var j = 0; j < controlClassName.length; j++) {
var currentInput = document.getElementsByClassName(controlClassName[j]);
if (currentInput.length > 0) {
for (var i = 0; i < currentInput.length; i++) {
if (controlClassName[j] == 'e-numerictextbox') {
$("#" + currentInput[i].id).ejNumericTextbox('disable');
} else if (controlClassName[j] == 'e-dropdownlist') {
$("#" + currentInput[i].id).ejDropDownList('disable');
} else if (controlClassName[j] == 'e-datepicker') {
$("#" + currentInput[i].id).ejDatePicker('disable');
} else if (controlClassName[j] == 'e-maskedit') {
$("#" + currentInput[i].id).ejMaskEdit('disable');
}
}
}
}
} |