Hi!
I have the following javascript:
$(document).ready(function() {
$('#<%= DropDownList1.ClientID %>').change(function() {
$('#<%= TextBox1.ClientID %>').disabled = $('#<%= DropDownList1.ClientID %>').selectedIndex != 1;
});
});
When I change the index of the dropdown, nothing happens. I have tried to replace the code with:
$(document).ready(function() {
$('#<%= DropDownList1.ClientID %>').change(function() {
alert($('#<%= DropDownList1.ClientID %>').id);
});
});
This generates an alert that says 'undefined'. If I remove the .id-part I get an alert that says [object Object] so I guess it has got something. What am I doing wrong?