* Copyright (C) 2007 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see http://www.gnu.org/ */ /** * \file htdocs/lib/ajax.lib.php * \brief Page called by Ajax request for produts * \version $Id$ */ function ajax_indicator($htmlname,$indicator='working') { $script.=''; return $script; } /** * \brief Get value of a field, do Ajax process and show result * \param htmlname Name and id of field * \param keysearch Optional field to filter * \param url Full relative URL of page * \param option champ supplementaire de recherche dans les parametres * \param indicator Nom de l'image gif sans l'extension * \return string script complet */ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working') { $script = ''; if ($indicator) $script.=ajax_indicator($htmlname,$indicator); $script.=''; $script.='
'; return $script; } /** * \brief Get value of a field, do Ajax process and show result * \param htmlname nom et id du champ * \param keysearch nom et id complementaire du champ de collecte * \param id ID du champ a modifier * \param url chemin du fichier de reponse : /chemin/fichier.php * \param option champ supplementaire de recherche dans les parametres * \param indicator Nom de l'image gif sans l'extension * \return string script complet */ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator='working') { $script = ''; if ($indicator) $script.=ajax_indicator($htmlname,$indicator); $script.=''; return $script; } /** * \brief Get value of field, do Ajax process and return result * \param htmlname nom et id du champ * \param url chemin du fichier de reponse : /chemin/fichier.php * \param indicator nom de l'image gif sans l'extension * \return string script complet */ function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working') { $script=''; $script.= ''; $script.= '
'; $script.= ''; return $script; } /** * \brief Get value of field, do Ajax process and return result. Use jQuery. * \param selected Preselected value * \param htmlname Name of html field * \param url Path of source file to get values: /path/ajaxpage.php * \param option Not used * \return string script complet */ function ajax_autocompleter2($selected='', $htmlname, $url, $option='') { $script = ''; $script.= ''; return $script; } ?>