freecarve
(Consulenza78)
August 4, 2013, 8:04am
1
Hi to all, I’m loosing time in creating a url where I have to attach a param from a dropdown list.
This is the dropdown
<?php echo $form->dropDownList($model,'riso_id',$risorsas); ?>
There is another element where I must create an url with the selection param:
$this->widget('EJuiAutoCompleteFkField', array(
'model'=>$model,
'attribute'=>'comm_id',
'sourceUrl'=>Yii::app()->createUrl('/attivitaRisorsaCoord/findCommessa', array('riso_id'=><img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?));
How I can attach the param from the DropDown selection in the second url? I try with JQuery but I don’t know how…
thanks
konapaz
(Konapaz)
August 4, 2013, 1:46pm
2
freecarve:
Hi to all, I’m loosing time in creating a url where I have to attach a param from a dropdown list.
This is the dropdown
<?php echo $form->dropDownList($model,'riso_id',$risorsas); ?>
There is another element where I must create an url with the selection param:
$this->widget('EJuiAutoCompleteFkField', array(
'model'=>$model,
'attribute'=>'comm_id',
'sourceUrl'=>Yii::app()->createUrl('/attivitaRisorsaCoord/findCommessa', array('riso_id'=><img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?));
How I can attach the param from the DropDown selection in the second url? I try with JQuery but I don’t know how…
thanks
Hi,
If EJuiAutoCompleteFkField works without ajax you have to write just
‘sourceUrl’=>Yii::app()->createUrl(’/attivitaRisorsaCoord/findCommessa’, array(‘riso_id’=>$model->riso_id))
if it works with ajax:
you can do that by javascript event, use firebug to detect what html element generate the EJuiAutoCompleteFkField. write a javascript trigger that fills the html tag that is releted with ‘sourceUrl’
I don’t know how exactly works this extensions, so may you have more work to do. (like trigger enter key etc)