Below is a simple search example by Jquery:
<script>
$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
</script>
<div class="demo">
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags" />
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
<p>The datasource is a simple JavaScript array, provided to the widget using the source- option.</p>
</div><!-- End demo-description -->
There's basically a variable with the autocomplete content, and that's great and all, except I need something perhaps a little more complex. Instead of providing a list from a var/xml/sql I need to grab from an echo issued by a third party php script.
That php script will echo out the appropriate information depending on the query. i.e.: the user searches for customsearch.php?q=Lemons it will echo "Pineapples".
How can I achieve that? Can someone show me the way?