I am getting this error after adding some autocomplete code. I am sure it has something to do with duplicate jQuery references after searching online but I have it referenced only once.
The application uses a master page but the page in question doesn't use it so I have jquery referenced in both.
$(".autosuggest").autocomplete({
source: function(request, response) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "CustomerTypes.aspx/GetAutoCompleteData",
data: "{'Customer':'" + document.getElementById('txtCustomerType').value + "'}",
dataType: "json",
success: function(data) {
response(data.d);
},
error: function(result) {
alert("Error");
}
});
}
});
autocomplete() is a method in the jQueryUI library. You need to add a reference to that as well as jQuery.js:
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css" />
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With