Thanks Mike
I really do appreciate the help you've been giving.
Look at the links you sent, and the examples here... I can use the Remote Datasource approach which is a bit simpler.
I've added the 'term' string into the query when it's loading which should make it more efficient but also changed the code to be:
- jQuery( ".Airports" ).autocomplete({
source: "http://www.proudlycarbonneutral.com/CarbonFootprintCalculator/FlightList.aspx",
minLength: 2,
select: function( event, ui ) {
log( ui.item ?
"Selected: " + ui.item.AirportName:
"Nothing selected, input was " + this.value );
}
});
This does seem to load it, in that it shows the ajax loading icone for a short while but then it disappears and no listing is shown.
Eg. if 'los' is used in the input, then the JSON would appear as
http://www.proudlycarbonneutral.com/CarbonFootprintCalculator/FlightList.aspx?term=los which shows 3 airports to choose from.
Unfortunately the form isn't showing the usual autocomplete select list. I did try removing the 'select' code from the autocomplete function above as it's a single field list to be shown but that didn't help.
I take it this is much closer? Is there something obvious not right in the above?
Many thanks
David