Answer the question
In order to leave comments, you need to log in
How can I cache the state of a CJuiDialog widget in Yii?
Good afternoon, such a problem.
I tried to make a pop-up window like here belyakov.su/yii-ispolzovanie-cjuidialog-dlya-sozda... and here loco.ru/materials/321-yii-cjuidialog-dlya-sozdaniy... . I have a theme connected, if that's important. And the problem is this: the widget is located in layouts/main.php , then it is displayed on each page when a certain button is clicked, but .. Each time the page is opened, this form is first shown as display: blockand only after the page is fully loaded and all scripts disappear. It looks very unaesthetic. I would either reduce this squalor to 1 time - the first loading of the site or as an option - you understand) Completely disappear the form, and so that it appears when necessary.
Answer the question
In order to leave comments, you need to log in
As far as I remember, you can set autoOpen to false .
$this->beginWidget('zii.widgets.jui.CJuiDialog',array(
'id'=>'mydialog',
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>'Dialog box 1',
'autoOpen'=>false,
),
));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question