Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Gridview, How To Pass $Data Into A Javascript Funtion

$
0
0
Hello,

I have this code :

 array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{update}',
            'buttons' => array(
                'update' => array(
                    'icon' => 'tasks',
                    'value' => '$data->date_inscription',
                    'label' => Yii::t('view', 'saisirAbsence'),
                    'visible' => '(Yii::app()->user->checkAccess("demAbsence.createAbsence") 
                        &&  Yii::app()->getController()->getAction()->getId() == "saisirPresence")? true : false',
                    'click' => 'function(){ $(\'#dialogAbsence\').dialog(\'open\');
                       $("#mesureId").val({$data->date_inscription});
                        return false;}',
                ),
            ),     


but here :
$("#mesureId").val({$data->date_inscription});


it is not working.

I get this error :

Quote

Uncaught SyntaxError: Unexpected identifie


he dont't know about $data->date_inscription.

Someone know how I can do ?

thanks

Nath

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>