1
I’m trying to requisition remote file PHP
with the plugin jQuery-autocomplete, but it’s not working. The plugin in question and this one: jQuery-autocomplete. I want to use it because it is very simple, light and meets what I need.
The requisition 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);
}
});
In the var choices
I need to put the file PHP
that will return the result. The problem is not working. I have already looked at the documentation and there is no complete example. Can someone help me with that?
remote request would be what? a remote address? or the search file is local?
– novic