Jquery autocomplete with JSONP not working -


i using below code autocomplete:

jquery('#id')         .autocomplete({             "select":function (event, ui)              {                 return false;             },             "focus":function(event, ui)              {                 return false;             },             "minlength":"3",             "source":function( request, response )              {                 jquery.ajax({                     type: 'get',                     url: 'http://localhost/autocompleteex',                     datatype: 'jsonp',                     jsonp: "jsonp-callback",                     contenttype: 'application/json; charset=utf-8',                     data: {                         search:request.term,                      },                     success: function(data) {                         response($.map( data, function( item ) {                             return {                                 label: item.label,                                 value: item.value                             }                         }));                     },                     error: function (msg) {                        console.log(' status : '+ json.stringify(msg));                     }                 });             }         }); 

server return json string as:

"jquery111305726958822940869_1443857160714([{\"value\":\"iklaabb77l36ovovtihwzwaabb77m0kj6xsjpmsl6i7oiz2tvpxt8s6ec7ret \",\"label\":\"a fantis parochial school, brooklyn ny\"}]);" 

am missing anything. shows error console log. idea?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -