Hi,
It's been a very LONG day, and I'm not even sure if I'm in the right place to ask this question.
I'm trying to get autocomplete (see below) to work but, although it's half working, bare with me. It is connecting to the php script and I'm getting the 'wait' icon in the query box. It's just not giving me any data back.
wp_enqueue_script('jquery-ui-autocomplete', '', array('jquery-ui-widget', 'jquery-ui-position'), '1.8.6');
wp_register_script('js-script1', plugins_url('auto04.js', __FILE__), array('jquery'));
wp_enqueue_script('js-script1');
////////////////////// This code is in file named: auto04.js
jQuery(document).ready(function($) {
//var availableTags = ["Batman", "Spiderman", "Hulk"];
$("#query1").autocomplete({
source: 'http://www.comparetrainfares.co.uk/wp-content/train_scripts/test-suggest-simple.php',
dataType: 'json',
remoteSourceStatic: true,
minLength: 3
});
});
//////////////////////////////////////////////////////