Enabled/Disabled dropdownlist
-
I want to enabled/disabled dropdownlist on checked/unchecked of a checkbox in datagrid but i want the above event to be done through javascript Can anyone help me at the earliest.
-
I want to enabled/disabled dropdownlist on checked/unchecked of a checkbox in datagrid but i want the above event to be done through javascript Can anyone help me at the earliest.
Hi, Below code solves your problem.
function newtest()
{
//check box checked
if(document.getElementById("CheckBox1").checked == true)
document.getElementById("DropDownList1").disabled = true;
else //check box uncheck
document.getElementById("DropDownList1").disabled = false;
}Add the below code inside checkbox tag..
OnClick="newtest()" 'removed' text has to be changed to 'onclick'
Hope this helps you...:)
-
Hi, Below code solves your problem.
function newtest()
{
//check box checked
if(document.getElementById("CheckBox1").checked == true)
document.getElementById("DropDownList1").disabled = true;
else //check box uncheck
document.getElementById("DropDownList1").disabled = false;
}Add the below code inside checkbox tag..
OnClick="newtest()" 'removed' text has to be changed to 'onclick'
Hope this helps you...:)
Thanks for ur Suggestion