In my web application I need to create an iframe button using quickdlgs for creating new records. But when I click the I frame button I am not getting the 'create' web page but I am getting an empty Iframe. My actionCreate code for the controller
public function actionCreate()
{
$model=new Store;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Store']))
{
$model->attributes=$_POST['Store'];
if($model->save())
{
EQuickDlgs::checkDialogJsScript();
$this->redirect(array('admin'));
}
$this->redirect(array('view','id'=>$model->id));
EQuickDlgs::render('create',array('model'=>$model));
// $this->redirect(array('create'));
}
}
My view code for the iframe
<?php
EQuickDlgs::iframeButton(
array(
//'id' =>'create',
// 'renderOpenButton' => false,
'controllerRoute' => 'create',
//'url' =>'/store/create',
'dialogTitle' => 'Create Store',
'dialogWidth' => 500,
'dialogHeight' => 500,
'openButtonText' => 'Create new',
'closeButtonText' => 'Close',
//'closeOnAction' => true, //important to invoke the close action in the actionCreate
'refreshGridId' => 'store-grid', //the grid with this id will be refreshed after closing
)
);
?>
This code I have written in the admin.php view page. But when I click the iframe button I am getting an empty iframe instead of the create button. Any body kindly help me with this.