I've tested this script on a normal index.php file, which is not using any CMS. And it's working fine.
`<form method="get" action="">
<input id="label_search" type="text" value="" maxlength="40" name="inputText"/>
</form>
<script type="text/javascript">
var options = {
script:"includes/autosuggest.php?json=true&",
varname:"input",
minchars: 2,
delay: 200,
json:true,
shownoresults:false,
maxresults:15,
timeout: 5000
};
var as_json = new bsn.AutoSuggest('inputText', options);
</script>`
Now I want to use the same code in a Wordpress template.
But nothing is happening. What could be wrong?
Seems like the script is not triggering at all.
I know the bsn.AutoSuggest_2.1.3.js is running, because an "alert('hello')" test on the file is executed on page load.
Anyone?
This is the plugin I use:
http://www.brandspankingnew.net/archive/2007/02/ajax_auto_suggest_v2.html