Rajasekar Ramalingam Rajasekar Ramalingam - 1 year ago 97
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 ) {
} );

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download