AJAX重复通话

This question has been answered many times but Those can not help me out. I have tried to do AJAX call from a form but some reason it called double time.

var requestVendor = false;
$("#vendor").change(function() {
    var value = $("#vendor option:selected").val(); 

    var courseURL = host.concat("/admin/getcourse");


    if (requestVendor !=true) {
        $.ajax({
            type: "POST",
            url: courseURL,
            data: {"id": value},
            success: function (response) {
                // done something here 
                requestVendor = true;
            }
        });
    }
});

enter image description here

How to prevent that duplicate call. It's driving me crazy right now.

I think it may be duplicate js(jquery.validate.unobtrusive.js) you are using in your project or you can check it out to comment it if you are using.

Hope it will help.