Hi I am trying to disable a dropdownlist in an asp.net web application whenever the selected index is changed. I have the following javascript in my web app but whenever it gets to the disabled = true line it is falling over. What I want to know is that the correct way to disable a dropdownlist in javascript. The dropdown list is part of a usercontrol which is on the web form so I am not sure how to do this?
DateDrop is the name of the dropdownlist on the usercontrol.
Form1 is the name of the form
function SubmitOnChange(dateOnChange)
{
var temp = dateOnChange.options[dateOnChange.selectedIndex].value;
document.Form1.Hid2.value = temp;
document.Form1.DateDrop.disabled=true;
document.Form1.submit;
}