Autocomplete result when use search bar from database utf-8 support
$(selector).autocomplete();
You can use options :
mkmap: boolean display folderOptions | Value | Default |
---|---|---|
url | link to the script which make the request | php/search.php |
param_name | the GET or POST parameter use by the PHP script | search |
show_all | boolean display all values on focus | false |
callback | a pointer to a function first parameter is the result second parameter is a pointer to the autocomplete wrapper | null |
onclear | function call when clear button is pressed | null |
className | the class name when element is highlighted (without dot) | select-autocomplete (defined in style.autocomplete.css) |
max_values | the maximum number of result display set to | 10 |
folder | false | |
no_result | text display when there are no result | no result |
key | an array of param | null |
value | an array of value param1=value1¶m2=value2... | null |
example :
var f = function(value, parent,is_folder){ alert(value); } $("#search_field").autocomplete({url: "php/search.php", callback: f, className: "perso"});