I'm trying to use http://jqueryui.com/autocomplete/#remote-jsonp within a Codeigniter framework I've looked at http://blog.andrewawhitaker.com/2012/09/29/jqueryui-autocomplete-top-5-sources-of-confusion/
The data source is formatted as a JSON data source with country codes and the place names as a series of objects e.g.
{"success":true,"data":[{"id":"ABZ","name":"Aberdeen","cityId":"ABER","countryId":"UK","city":{"id":"ABER","name":"Aberdeen","cityId":"ABER","countryId":"UK","country":{"id":"UK","name":"United Kingdom","countryId":"UK","isCity":null,"isCountry":true}, "country":{"id":"CH","name":"Switzerland","countryId":"CH","isCity":null,"isCountry":true},"isCity":false,"isCountry":false}]}
The suggestion box displays but the results are undefined because the item parameter of the response is null.
How can I fix this problem? (I tried to paste the jquery code here but the form keeps bitching about my tab indenting).
jquery event:
$("#origin").live('click', function(){
// code in the js fiddle });