I'm using the following script which displays a pop-up error if a person has picked same values from multiple drop-downs. Works great, however after showing the pop-up, the duplicate selection still takes place. It should prevent this from happening.
$(document).ready(function () {
$('select').change(function () {
if ($('select option[value="' + $(this).val() + '"]:selected').length > 1) {
alert('You have already selected this option previously - please choose another.')
}
});
});