I'm getting a JSON array from server :
mysql_select_db('******') or die("Error connecting to db.");
$res = mysql_query("SELECT DISTINCT(valeur) as val FROM *****") or die(mysql_error());
while($r = mysql_fetch_assoc($res)){
$tab[] = $r['val'];
} echo json_encode($tab);
unset($tab);
And :
$.getJSON("autocomp.php?id=valeur", function(data){
$("#other-valeur").autocomplete({delay: 100, source: data, dataType: 'json'});
});
The server returns me a correct json array :
["UMTS","RAN","Swap","Regions","Brasseur",...]
But when i start typing something in the input, i get this message in firebug:
c is null
In the jquery code...
What i dont understand is that i'm doing the exact same thing for another input on the same page, and it work perfectly, the json array look the same, the code is the same...
c?