You could do this with AJAX to check on the fly, but you don't need to. You need a JavaScript function, and a search to get the list you want...
The attached file is actually a html file (called actb.txt due to upload restrictions) - take it, rename it, and load it to a webserver. It will autocomplete based on the array defined at Line 654:
<script>
var customarray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin');
</script>
For our purposes we want to use a find to FileMaker. I use FX but the idea is to get an array back. Pseudo-code:
<?php
//Do a find and then a foreach
$actb_list = "";
foreach($findData['data'] as $key=>$value) {
$actb_list = "'".$value['field'][0]."',";
}
?>
<script>
var customarray=new Array(<?php echo $actb_list; ?>);
</script>
Now the JS array should be populated with the data from the find and be able to be auto-completed...