#6472: probleme ajax updater --------------------------+------------------------------------------------- Reporter: cmassot | Type: Bug Status: new | Priority: Medium Milestone: 1.2.x.x | Component: General Version: 1.2 Final | Severity: Normal Keywords: | Php_version: n/a Cake_version: | --------------------------+------------------------------------------------- Le code d'appel à la fonction Javascript[[BR]] {{{ <?php echo $html->link($html->image('add2.png', array('border' => '0')), "javascript:addParticipations('','','','','');", null, null, false); ?> }}} [[BR]]
Le code de la fonction Javascript {{{ function addParticipations(max, duree, fam, sfam, prod) { //alert('url : add_participation/' + i_part ); new Ajax.Updater('testor','add_participation/' + i_part + '/' + max + '/' + duree + '/' + fam + '/' + sfam + '/' + prod, {asynchronous:true, evalScripts:true, insertion:Insertion.Bottom, requestHeaders:['X-Update', 'testor']}); i_part++; } }}} Le code de l'action dans le contrôleur {{{ function add_participation($i, $max = null, $duree = null, $fam = null, $sfam = null, $prod = null) { $this->layout = 'ajax'; $this->recherche(); $this->set('cpt', $i); $this->set('max', $max); $this->set('duree', $duree); $this->set('fam', $fam); debug(func_get_args()); if($fam != ''){ $tsfam = $this->Critere->find('list', array('conditions' => array('AND' => array(array('Critere.parent_id' => $fam), array('(Critere.rght - Critere.lft) >' => 1))))); }else{ $tsfam = ''; } $this->set('tsfam', $tsfam); $this->set('sfam', $sfam); if($fam != ''){ $tprod = $this->Critere->find('list', array('conditions' => array('AND' => array(array('Critere.parent_id' => $sfam), array('(Critere.rght - Critere.lft) ' => 1))))); }else{ $tprod = ''; } $this->set('tprod', $tprod); $this->set('prod', $prod); } }}} -- Ticket URL: <https://trac.cakephp.org/ticket/6472> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---