I have a problem with CButtonColumn of grid, I need to store an ID contact in PHP variable, to use the variable in a Javascript function, is very important. Help please…
the code:
array
(
'class'=>'CButtonColumn',
'header'=>'Acciones',
'template'=>'{Detail}{Commentary}{Address}{CompanyEmployee}{Quote}{Task}',
'buttons'=>array
(
'Detail' => array
(
'label'=>'Información del Contacto',
'imageUrl'=>Yii::app()->request->baseUrl.'/images/eye.png',
'url'=>'Yii::app()->createUrl("contact/viewWindow",array("id" => $data["id_contact"]))',
'click'=>'js:function(){
var aux=$data->id_contact; //here is the problem!!!!
$.window({
title: var, //here is the problem!!!!
url: $(this).attr("href"),
resizable:true,
height:600,
width:1020,
maxWidth:1020,
bookmarkable:false,
showFooter:false,
onClose: function(){
$.fn.yiiGridView.update("Contact1"),
$.fn.yiiGridView.update("Contact2")
}
});
$.window.prepare({
dock:"bottom",
showLog:true
});
return false;
}'
),