In a MVC application, I have JQuery-UI AutoComplete textbox which fetches data from database. MinLength and Select not working. I have uploaded the complete project including the DBScript and DB backup at location : https://drive.google.com/file/d/0B6vvhyjkwQ8eMzVQNUJmaUtQMWc/edit?usp=sharing
$(document).ready(function () { $("#txtPublisherName").autocomplete({ source: function(request,response) { $.ajax({ url: "/Publisher/SearchPublisherByName", type: "POST", dataType: "json", data: { term: request.term }, success: function (data) { response($.map(data, function (item) { return { id: item.Id, label: item.Name, value: item.Name }; } )) }, select: function (event, ui) { $("#publisherId").val(ui.item.value); return true; }, minLength: 4 }) }, messages: { noResults: "", results: "" } }); })