Reputation: 131
I am trying to open a dialog popup after clicking view button in YII Framework, I am struck while calling CJuiDialog from YII controller action of view.
Please provide solution for this ,
Upvotes: 0
Views: 817
Reputation: 8726
I think here no need to consider Controller as you are trying to integrate the Widgets which is a part in YII View.
Check bellow script to generate a JuiDialog
when you click on the button
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog',array(
'id'=>'Exe1',
'options'=>array(
'title'=>'My Dialog',
'autoOpen'=>false,
'show'=>array('effect'=>'fadeIn','duration'=>100),
'hide'=>array('effect'=>'fadeOut','duration'=>100),
),
));
echo 'Hello...!';
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
<button onclick='$("#Exe1").dialog("open");'>View</button>
Upvotes: 1