<datalist id="suggestions">
<?php
$getShows=getShows();
if($getShows){
foreach($getShows as $show){
echo '<option value="'.$show['showname'].'" >';
}
}
?>
</datalist>
<input placeholder="Search shows" id="q" name="q" value="<?php if(isset($_GET['q']))echo $_GET['q']; ?>" onkeypress="if (event.keyCode == 13) window.open('?q='+this.value,'_self')" list="suggestions" />
<img src="images/search.gif" onclick="window.open('?q='+document.getElementById('q').value,'_self')" style="cursor:pointer">
If this makes sense to you, know this; the limit from my testing for today's version of google chrome (40) is about 100, maybe 130 but didn't always work.
UPDATE Jan 28, 2015: It seems the issue was with the queries and there were too many for the server to load or something. Works with larger amounts (over 200).
Let me know what methods you use for this if any and if you use this feature. Thanks.
No comments:
Post a Comment