From 340a3f4bcc3f97a7d3253086d6307cd774842716 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 8 Oct 2010 15:28:18 +0000 Subject: [PATCH] Test: search company with jQuery --- htdocs/core/class/html.form.class.php | 10 ++-------- htdocs/lib/ajax.lib.php | 22 +++++++++++++++++++--- htdocs/societe/ajaxcompanies.php | 8 ++++---- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bfd8768aacd..50b986774b9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -553,11 +553,6 @@ class Form $socid = $obj->rowid?$obj->rowid:''; } - // We call a page after a small delay when a new input has been selected - //$javaScript = "window.location=\'...\'"; - //$htmloption = 'onChange="ac_delay(\''.$javaScript.'\',\'500\')"'; - $htmloption=''; - print "\n".''."\n"; print ''; print '
'; @@ -565,12 +560,11 @@ class Form print '
'; if ($socid == 0) { - //$langs->load("companies"); - print ''; + print ''; } else { - print ''; + print ''; } print '
'; //print ajax_autocompleter(($socid?$socid:-1),$htmlname,'socid',DOL_URL_ROOT.'/societe/ajaxcompanies.php?filter='.urlencode($filter), ''); diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index 4911b142a85..cd600f992be 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -91,11 +91,27 @@ function ajax_autocompleter($selected='',$htmlname,$value,$url,$indicator='worki $script.= '