diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index 8f39d8593be5c..132f5f8c7a688 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2007-2010 Regis Houssin + * Copyright (C) 2007-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,15 +30,17 @@ * @param htmlname HTML name of input field * @param url Url for request: /chemin/fichier.php * @param option More parameters on URL request - * @param minLength Minimum number of chars to trigger tha Ajax search + * @param minLength Minimum number of chars to trigger that Ajax search + * @param autoselect Automatic selection if just one value * @return string script complet */ -function ajax_autocompleter($selected='',$htmlname,$url,$option='',$minLength=2) +function ajax_autocompleter($selected='',$htmlname,$url,$option='',$minLength=2,$autoselect=0) { $script = ''; $script.= '