Autocomplete developed on MAMP does not work on WAMP?
I have recently enjoyed developing a browser based data entry app with UI. It was developed on a mac and is primarily targeted for IE. When I moved the code and data to a windows server using WAMPSERVER other jqueryUI elements seem to work including dialog and validator but
autocomplete does not.
Development was done on 1.8.8 and updated to 1.8.10. After testing with demos I learned that remote strings don't work on later releases of autocomplete on PC WinXP so I learned and rebuilt using JSON. The results are the same. It works well on the mac but still not on XP.
What am I missing? Thanks.
Here is code ...
Local:
$(function() {
$("#last").autocomplete( {
source: 'auto_suggest_last_tags.php',
minLength: 2,
change: function(event, ui) {
secondary_url = "auto_suggest_first_tags.php?last=" + ($(this).val());
$("#first").autocomplete("option", "source", secondary_url);
} });
});
Remote:
<?php
include "data_open.php";
$term = $_GET['term'];
$counter='0';
$return_arr = array();
$res = mysql_query("select last from donor_details where last like '$term%' ORDER BY last");
while ($row = mysql_fetch_array($res)) {
$counter++;
$name =$row["last"];
$return_arr[] = $name;
}
echo json_encode(array_values(array_unique($return_arr)));
include "data_close.php";
?>