开发者

CJuiDialog page redirect, Yii web application

I am trying to implement a password reset page. After the password is reset i want it to display a dialog saying the email was sent then redirect the page to the login screen the the 开发者_C百科dialog is closed.

Here is what have for the dialog and redirect:

$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
            'id'=>'mydialog',
            'options'=>array(
                'title'=>'Email Notification',
                'autoOpen'=>true,
             ),
        ));

 "Email has been sent!";

 $this->endWidget('zii.widgets.jui.CJuiDialog');

 $this->redirect(Yii::app()->createUrl('site/login'));

When the user hits submit to start the password reset function it displays this error page:

Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/yii/framework/zii/widgets/jui/CJuiDialog.php:73)

Does anyone know how to fix this? also is there a way to add an ok button on the dialog so when they click ok then it redirects to the login screen?


Ended up adding a button to the dialog. When the button is pressed, it uses javascript to redirect to my login page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜