Hi everybody.
I have a view where I have a script :
If I alert() nbNavettes i have the right number.
but now, I want to reuse this var in my php.
So I have to go back to the server. (no?)
then, I try to send it with a render partial :
<?php
echo( $this->renderPartial(
'_prixNavette',
array(
'form'=>$form,
'numJour'=>$i,
'q'=>$q,
'nbNavettes'=>'js:nbNavettes'),
TRUE));
or with an ajax function :
<script type="text/javascript">
$.ajax({
url: "<?php echo CController::createUrl('admin/UpdateAjaxFormPrixQualite');?>",
data: (
'form'=>$form,
'numJour'=>$i,
'q'=>$q,
'nbNavettes'=>'js:nbNavettes')
});
</script>
but doesnt work
have any other idea? (I got the string ‘js:nbNavette’ and not the value… ^^
is that possible to have this format of code to send it ?
// this work on a dropdown list ajax option.
'ajax' => array(
'type' => 'POST',
'url' => @Yii::app()->createUrl('admin/UpdateAjaxFormNbJours'),
'data' => array('form'=>serialize($form),'nbJours'=>'js:this.value', 'tab'=>$tab),
'update' => '#dateEvent'),
thanks