Open theoremanand opened 9 years ago
Hey There,
My PHP is outputting the JSON data as below. But I dont see it working. Can you help me resolving this please...
[{"title":"Caterers"},{"title":"Decorators"},{"title":"Venue"},{"title":"Invitations"},{"title":"Photographers"},{"title":"Entertainment"},{"title":"Wedding Apparel"},{"title":"Travel"},{"title":"Accomodation"},{"title":"Event Planners"},{"title":"Beauty"},{"title":"Gifting"},{"title":"Jewellery"},{"title":"Nitty Gritty"}]
$('#remote_input').autocomplete({ valueKey:'title', minLength: 2, visibleLimit: 5, source:[{ url:"test.php?s=%QUERY%", type:'remote', getValueFromItem:function(item){ return item.title }, ajax:{ dataType : 'jsonp' } }]});
jsonp - it's not JSON it must be functionname({json});
Hey There,
My PHP is outputting the JSON data as below. But I dont see it working. Can you help me resolving this please...
[{"title":"Caterers"},{"title":"Decorators"},{"title":"Venue"},{"title":"Invitations"},{"title":"Photographers"},{"title":"Entertainment"},{"title":"Wedding Apparel"},{"title":"Travel"},{"title":"Accomodation"},{"title":"Event Planners"},{"title":"Beauty"},{"title":"Gifting"},{"title":"Jewellery"},{"title":"Nitty Gritty"}]
$('#remote_input').autocomplete({ valueKey:'title', minLength: 2, visibleLimit: 5, source:[{ url:"test.php?s=%QUERY%", type:'remote', getValueFromItem:function(item){ return item.title }, ajax:{ dataType : 'jsonp'
} }]});