Reputation: 8635
I'm trying to disable textbox using jquery:
$('#<%=txtFrom.ClientID %>').attr('disabled', true);
It looks as disabled: , but actually it's not, I can write there. Why?
UPDATE: Fixed by adding input in the code:
$('#<%=txtFrom.ClientID %> input').attr('disabled', true);
Upvotes: 2
Views: 3332
Reputation: 1728
You need to do that:
$('#YOUR_ELEMENT_ID').attr("disabled", "disabled");
Upvotes: 1