corvus
(Yiiframework)
1
Hi,
i’m new to the yii framework and so far very enthusiastic 
my problem is:
i have a page with a CGridView and a Button in a column
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'machines-grid',
'dataProvider'=>$dataProvider_Machines,
'filter'=>$model_machines,
'ajaxUpdate' => true,
'columns'=>array(
'job_id',
'and more fields ...',
array(
'class'=>'CButtonColumn',
'template' => '{btnGraph}',
'buttons' => array(
'btnGraph' => array(
'label' => 'Show Chart',
'url' => 'Yii::app()->createUrl("/site/graph", array("job_id" => $data->job_id))',
'imageUrl' => Yii::app()->baseUrl . '/images/symbols/column-chart_16x16.png',
),
),
),
),
));
now when i click on the btnGraph button i would like to open a JS Window in the actual page with the dynamic url and show it.
but i dont have a clue how to solve this the best way…
can someone help me?
thanks 
corvus
(Yiiframework)
2
after a week of trying different methods and plugins i have found a working solution. its not the best i think (ugly JS code) but it works 
now i use the "facebox" plugin for jQuery (its in the plugin section on the jQuery homepage).
and so i can easy open a modal window in the same page just by adding a option to the button.
(‘options’ => array(‘rel’ => ‘facebox’,)
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'machines-grid',
'dataProvider'=>$dataProvider_Machines,
'filter'=>$model_machines,
'ajaxUpdate' => false,
'columns'=>array(
'job_id',
'and more fields ...',
array(
'class'=>'CButtonColumn',
'template' => '{btnGraph}',
'buttons' => array(
'btnGraph' => array(
'label' => 'Show Chart',
'url' => 'Yii::app()->createUrl("/site/graph", array("job_id" => $data->job_id))',
'imageUrl' => Yii::app()->baseUrl . '/images/symbols/column-chart_16x16.png',
'options' => array('rel' => 'facebox',
),
),
),
),
));
[EDIT]
the Ajaxupdate must be set to FALSE to get this working 