My website is called Earthquake Damage Map. I am trying to make a search box autocomplete with a list of possible results from the column in the fusion table. This is a good example, however I find it difficult to match it to my own as I now have my queries joined by AND. This is my university project and any help would be appreciated. How do I edit the following code to allow this?
searchString = document.getElementById('search-string4').value;
if(searchString){
query.push("'Earthquake' CONTAINS '" + searchString + "'"); }
<div style="margin-top: 10px;">
<label>Earthquake Name:</label><br />
<input type="text" id="search-string4" />
<input type="button" onclick="doQuery();" value="Search" />
</div>
Part of your solution will involve getting from your Fusion Table a unique list of values from your Earthquake column. This can be done via FT’s undocumented JSONP API. Then you can use jqueryui Auto Complete methods on your text input. Here’s the code. Sorry it’s a bit long but it’s a complete file which should run in your browser.
enter code here