CJuiDialog is used to display a dialog box, a mode or a non-mode dialog box. It encapsulates the JUIDialog plug-in. CJuiDialog is used to display a dialog box, a mode or a non-mode dialog box. It encapsulates the JUI Dialog plug-in.
The basic usage is as follows:
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'mydialog','options'=>array('title'=>'Dialog','width'=>500,'height'=>300,'autoOpen'=>false,),));echo 'dialog content here';$this->endWidget('zii.widgets.jui.CJuiDialog');?>array('onclick'=>'$("#mydialog").dialog("open"); return false;')); ?>$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'mymodal','options'=>array('title'=>'Modal Dialog','width'=>400,'height'=>200,'autoOpen'=>false,'resizable'=>false,'modal'=>true,'overlay'=>array('backgroundColor'=>'#000','opacity'=>'0.5'),'buttons'=>array('OK'=>'js:function(){alert("OK");}','Cancel'=>'js:function(){$(this).dialog("close");}',),),));echo 'Modal dialog content here ';$this->endWidget('zii.widgets.jui.CJuiDialog');?>array('onclick'=>'$("#mymodal").dialog("open"); return false;')); ?>
Mode and non-mode are configured by setting 'modal' => true/false. CJuiDialog defines the dialog box. to display the dialog box, you need to use other UI components. In this example, the dialog box is displayed through Link.
The above is the content of the Zii component-Dialog sample in the PHP development Framework Yii Framework tutorial (37). For more information, see PHP Chinese website (www.php1.cn )!