I'm trying to create some JavaScript that will identify two matching drop down lists and send a pop-up alert. The alert would state "You must select one schedule per rank.". It would be nice to have it prevent the user from submitting the form if duplicate schedules are chosen but not a requirement.

Example of Form

I attempted to use various JavaScript snippets using the developer tools in IE10 but just something as simple as creating an alert on drop down change wouldn't work according to the editor:

enter image description here

I'm not sure what I'm doing wrong and I'm not sure where to even begin with finding duplicates in the drop down lists.

  • Can you use infopath?
    – Aboba
    Jun 26, 2014 at 22:32

1 Answer 1


The $ character is the alias for jquery. You need to reference the jquery library before you reference the code you will be using for jquery. You should have a line like this in your markup of the page, masterpage, template, etc:

<script type="text/javascript" src="/sitecollection/style library/jquery-1.11.0.min.js"></script>

If you don't have jquery you can download it here: http://jquery.com/download/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.