jquery validation in drop down
-
jquery validation in Drop down.. if i am select the value another same div can't select this value.. and print the alerdy message "this value already selected"
-
jquery validation in Drop down.. if i am select the value another same div can't select this value.. and print the alerdy message "this value already selected"
There is no magic way to do it. You need to write code to do it. Write code for the change event of the dropdown. Check if it's value is already selected. If so, display a message and reset the dropdown selected value.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
jquery validation in Drop down.. if i am select the value another same div can't select this value.. and print the alerdy message "this value already selected"
Just remove the value from the next select using JQuery Then if they change the first value, add the value back, or reload the values in the next select
If it ain't broke don't fix it Discover my world at jkirkerx.com
-
There is no magic way to do it. You need to write code to do it. Write code for the change event of the dropdown. Check if it's value is already selected. If so, display a message and reset the dropdown selected value.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
$("#everything").validate({
onsubmit: true,
rules: {
dd1: {
required: {
depends: function(element) {
return $("#dd1").val() == "none";
}
}
},
messages: {
dd1: {
required: "Please select an option from the list, if none are appropriate please select 'Other'",
},
}
});