I'm trying to remotely request a PHP
file with the jQuery-autoComplete , but it is not working. The plugin in question is the one here: jQuery-autoComplete . I want to use it for being very simple, light and meets what I need.
The request is made like this:
$('input[name="q"]').autoComplete({
minChars: 2,
source: function(term, suggest){
term = term.toLowerCase();
var choices = ['ActionScript', 'AppleScript', 'Asp', ...];
var matches = [];
for (i=0; i<choices.length; i++)
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
suggest(matches);
}
});
No var choices
I need to put the file PHP
that will return the result. The problem is that it does not work. I've already taken a look at the documentation and do not have a complete example. Can anyone help me with this?