Skip to content

ComeBurguburu/autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoComplete

Autocomplete result when use search bar from database utf-8 support

$(selector).autocomplete();

You can use options :

mkmap: boolean display folder
Options ValueDefault
url link to the script
which make the request
php/search.php
param_name the GET or POST parameter use by the PHP scriptsearch
show_allboolean display all values on focus false
callbacka pointer to a function
first parameter is the result
second parameter is a pointer to the autocomplete wrapper
null
onclearfunction call when clear button is pressednull
classNamethe class name when element is highlighted (without dot) select-autocomplete
(defined in style.autocomplete.css)
max_valuesthe maximum number of result display

set to null to disable limit (can reduice performance

10
folderfalse
no_resulttext display when there are no resultno result
key an array of paramnull
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"});