From f210f76677d3f175fcc593638d2fdd974896a25e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 12 Feb 2007 12:27:48 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20ajout=20d'une=20tempo=20avant=20l'execut?= =?UTF-8?q?ion=20de=20autofilltownfromzip=5Fsave=5Frefresh=5F*=20afin=20qu?= =?UTF-8?q?e=20les=20donn=E9es=20se=20mettent=20en=20place=20en=20Ajax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/html.form.class.php | 16 ++++++++++++++-- htdocs/lib/lib_head.js | 11 +++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 556f8651791..0ce30b18155 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -325,10 +325,22 @@ class Form { $obj = $this->db->fetch_object($resql); $pays_id = $obj->rowid?$obj->rowid:''; + + // On applique un delai d'execution pour le bon fonctionnement + $mode = substr($htmloption,-9,6); + if ($mode == 'create') + { + $htmloption = 'onChange="ac_delay(\'autofilltownfromzip_save_refresh_create()\',\'500\')"'; + } + else + { + $htmloption = 'onChange="ac_delay(\'autofilltownfromzip_save_refresh_edit()\',\'500\')"'; + } + print '
'; - print ''; + print ''; print ''; - print ''; + print ''; print '
'; print '
'; print '