I have a drop-down like this:
<asp:DropDownList ID="cboJPRem" class="jprem" runat="server">
<asp:ListItem Value="None" Selected="True" Text="None"></asp:ListItem>
<asp:ListItem Value="1day" Text="1 day"></asp:ListItem>
</asp:DropDownList>
This drop-down gets disabled and enabled based on value of field 'check A'. If check A is 'T', drop-down will be enabled, if check A is 'F' drop-down will be disabled.
My requirement is to give an alert message(To enable this drop down, change the value of 'check A') when user clicks on disabled drop-down.
$(document).ready(function() {
$("#cboJPRem").change(function(){
if($("#cboJPRem:selected").attr("id") == "cboXyz"){
alert("To enable this drop down, change the value of 'check A'");
}
});
});
Above code is my attempt to add alert but it is not working. Is there any way to do this?