$('#txtAfgModelGrpName').autocomplete({ source: function (request, response) { $.ajax({ url: v_url, data: "{ 'Name': '" + request.term + "' }", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", dataFilter: function (data) { return data; }, success: function (data) { if (data == null || data.length == 0 || data.d == null) { data = ""; data.d = ""; } else { response($.map(data.d, function (item) { return { value: item.GrpName, id: item } })) } }, error: function (err) { alert(err); } }); }, minLength: 3, select: function (event, ui) { LoadData(ui.item.id.GrpSeq); return true; }, change: function (event, ui) { debugger } }) .focus(function () { if (this.value == "") { $(this).trigger('keydown.autocomplete'); } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)