CJuiDialog Close Automatically With IFrame In Yii

Cjuidialog Controller [CjuidialogController.php]

I added the controller for cjuidialog action.

class CjuidialogController extends Controller
    public function actionCJuidialog(){
    public function actionAjax(){

CjuiDialog View [cjuidialog.php]

Using this code I added content into iframe via ajax request. I called "cjuidialog/ajax" action to get the content and i load that content into iframe.

            return false;                        
    $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
        'title'=>'Ajax Jui Dialog IFrame',
    <iframe id="iframe" width="100%" height="100%"></iframe>
    echo CHtml::link("Ajax CJuidialog","#",array("id"=>"opencjuidialog"));

CjuiDialog Ajax View With Auto Close [ajax.php]

This content will open into iframe of cjuidialog via ajax. When it loaded, It shows one alert box and then it will close automatically.

    alert('CJuidilog will close now');
Welcome Yii CJuiDialog