i have numbers of dropdownlist, so i want to change event of every dropdownlist in form, when i select particular dropdownlist item then it will fire event for particular dropdownlist only... here is two sample of dropdownlist
<asp:DropDownList ID="ddlGender" runat="server" AutoPostBack="True">
<asp:DropDownList ID="ddlMaritalStatus" runat="server" AutoPostBack="True">
Please help me as soon as possible Thank you
I tried this
$(document).ready(function () {
$('input:text').each(function () {
$(this).attr('disabled', true);
});
$("select").change(function () {
alert(this.value);
if (this.value != "User Select") {
alert(this.value);
$('input:text').each(function () {
$(this).attr('disabled', false);
});
}
if (this.value == "User Select") {
$('input:text').each(function () {
$(this).attr('disabled', true);
});
}
})
});
here last condition is not working, please help
AutoPostBack="True"which is going to reload the whole page, rendering any JavaScript event handlers moot.)