PHP development framework YiiFramework tutorial (37) Zii component-Dialog example

Source: Internet
Author: User
PHP development framework YiiFramework tutorial (37) Zii component-Dialog example

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 ',
& Apos; width & apos; = & apos; 500 & apos,
& Apos; height & apos; = & apos; 300 & apos,
'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 ',
& Apos; width & apos; = & apos; 400 & apos,
& Apos; height & apos; = & apos; 200 & apos,
'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 must use other UI components, in this example, the dialog box is displayed through Link.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.