Jquery UI Autocomplete. What am I doing wrong here?
I am using Jquery UI Autocomplete to get a list of names. But for some reason I am getting error
This is the Autocomplete code
- $('#repName').removeAttr('readonly').focus(function () {
- $(this).val('');
- }).autocomplete({
- source: function (request, response) {
- tagId = $('#TagId').val();
- $.ajax({
- url: '/Developement/GetRepName', type: 'POST', dataType: 'json',
- data: { searchText: request.term, maxResults: 10, tagId: tagId },
- success: function (data) {
- response($.map(data, function (item) {
- return {
- label: item.Name,
- value: item.RepId,
- id: item.RepId
- }
- }))
- }
- })
- },
- select: function (event, ui) {
- commissionAllicationModifications(ui.item.id, 0, 'A');
- }
- });
I have no clue why this is happening.
I am using Jquery UI 1.8.1
I would appreciate any kind of help on this.