Robert Treadwell
asked on
Jquery check value change across multiple Dropdownlist
I wanting to know is it possible to check the change of like Dropdownlist in one jquery function.
Currently I can check the change of one or another control, ie. $('#<%= Allergies1DDL.ClientID %>').change(function () {... and then do the same for $('#<%= Allergies2DDL.ClientID %>').change(function () {...
But I would like to combine the change event to listen for change using an OR operator like,
$('#<%= Allergies1DDL.ClientID %>' || '#<%= Allergies2DDL.ClientID %>').change(function () {...
Is this possible? When I run the program the first item is only works.
Currently I can check the change of one or another control, ie. $('#<%= Allergies1DDL.ClientID %>').change(function () {... and then do the same for $('#<%= Allergies2DDL.ClientID %>').change(function () {...
But I would like to combine the change event to listen for change using an OR operator like,
$('#<%= Allergies1DDL.ClientID %>' || '#<%= Allergies2DDL.ClientID %>').change(function () {...
Is this possible? When I run the program the first item is only works.
//This section checks DropdownList on change if 'Other' has been selected if it has then Open Jquery UI and allow user to add item.
$(document).ready(function () {
$('#<%= Allergies1DDL.ClientID %>').change(function () {
var aDDL = $(this).val();
if (aDDL == "-1") {
//Open Jquery Dialog
addDDLOpenDialog(-1, "Allergies");
}
});
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.