Ajax Request And Returnurl

How can i redirect to the url of the ajax that drives to login page.


$form1 = $this->beginWidget(‘CActiveForm’, array(

            'id' => 'contactcasa-form1',

            'enableClientValidation' => true,

            'clientOptions' => array('validateOnSubmit' => true,),

            'action' => $actio,

            'htmlOptions' => array('role' => 'form',)


is ajaxform.

after login i go to the page that contains the form and i want to be redirected to the form action page.

i’m using CWebUser::setReturnUrl(‘preco/clientCreate’);

but after $this->redirect(Yii::app()->user->returnUrl);

i dont go to ‘preco/clientCreate’;