Rajasekar Ramalingam Rajasekar Ramalingam - 3 months ago 6
Ajax Question

Jquery AJax select option is not working

I have a page which contains autocomplete. i have tried the following code. it works awesome. but issue is select did not fire and alert at all not coming.Please help me to resolve this.


serviceUrl: '${pageContext.request.contextPath}/cn/contact/getAccountTags',
paramName: "tagName",
delimiter: "," ,
transformResult: function(response) {

return {

suggestions: $.map($.parseJSON(response), function(item) {

return { value: item.tagName, data: item.id };
} )


select: function(event, ui) {

$( "#w-input-search" ).on("autocompleteselect", function( event, ui ) {
} );


I think the correct configuration is onSelect and not select. I suppose you are using Ajax Autocomplete for jQuery

From the docs:

onSelect: function (suggestion) {} Callback function invoked when user selects suggestion from the list. this inside callback refers to input HtmlElement.