Hi all,
I am stuck because my $params are undefined in the controller. May be
you have an idea or an experience that would help me and others.
I reload a select with an observe field
my element is :
======================ELEMENT================================
<div id="options_vehicules">
<table>
<tr>
<td>
Véhicule <input type='text'
ondblclick="document.getElementById('vehicule_select').value='*';"
id='vehicule_select' name='vehicule_input' size='10'>
<?php echo $ajax->observeField('vehicule_select', array('size'=>'20',
'update'=>'vehicule_span', 'url'=>'/tournees/refresh_vehicules',
'frequency'=>1, 'stripe();')); ?>
</div>
<span id='vehicule_span'>
<?php echo $html->selectTag('Vehicule/IDP_vehicules',
$desoptions);
?>
</span>
</form>
</td></tr>
</table></div>
===============================CONTROLLER METHOD=====================
function refresh_vehicules() {
$this->layout = "ajax";
$desoptions =
$this->Vehicule->listedesvehicules(mysql_real_escape_string($params['form']['vehicule_select']));
$this->set('desoptions',$desoptions);
}
=============================ACTION========================================
<?
$params = array('controller'=>'tournees', 'desoptions'=>$desoptions);
echo $this->renderElement('liste_vehicules', $params);
?>
Thank you for any hunch, suggestion or solution.
Sten
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---