This is my JQuery
$(document).ready(function () {
$("#txtId").autocomplete({
source: function (request, response) {
$.ajax({
type: "POST",
url: '@Url.Action("ActionName", "Controller")',
dataType: 'json',
data: "{ 'mode': 'mode','prefix': '" + request.term + "' }",
contentType: "application/json;charset=utf-8",
success: function (data) {
var transformed = $.map(data, function (item) {
return item.Name;
});
response(transformed);
},
error: function() {
alert('error loading');
},
});
},
});
});
I get the error only when the "response(transformed);" is used. I have included all the required scripts, firstly jquery and next jquery-ui.js . I have included this in the bundle config. How should I resolve this error, I cam across lot of solutions stating that jquery.js or jquery-ui.js would not be loaded. But in my case both are loaded correctly. Can some one help me out on this?
User contributions licensed under CC BY-SA 3.0