Yii Iframe Tutorials

CGridview Auto Update With CJuiDialog

This tutorial will help you to update the cgridview with out page reload When you use the CJuiDialog Form to update the record. Some time We will do this type of concept. We have to show the listing and update action in cgridview widget page to avoid the new page for updating the record or some technical concept based on project. Here I used iframe concept with cjuidialog to update […]... Read More »

CJuiDialog Close Automatically With IFrame In Yii

Cjuidialog ControllerCjuiDialog ViewCjuiDialog Ajax View With Auto CloseCjuidialog Controller [CjuidialogController.php]I added the controller for cjuidialog action. <?php class CjuidialogController extends Controller { public function actionCJuidialog() { $this->render("cjuidialog"); } public function actionAjax() { $this->render("ajax"); } } ?> 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. <?php Yii::app()->clientScript->registerScript("iframe-cjuidialog"," $('#opencjuidialog').live('click',function() { $('#iframe').attr('src','".Yii::app()->createAbsoluteUrl("cjuidialog/ajax")."'); $('#cjui-dialog').dialog('open'); […]... Read More »