Fancybox Extension

these my view

<?php

$this->breadcrumbs=array(

'Fancybox01',

);?>

<?php echo CHtml::link(“Choosen”,array(’/Fancybox01/ninja’), array(‘id’=>‘iframe’),array(‘partial’ => ‘1’)) ?>

  &lt;?php &#036;this-&gt;widget('ext.fancybox.EFancyBox', array(


       'target'=&gt;'a#iframe',


           'config'=&gt;array(


             'scrolling'=&gt;'no',


            'titleShow'=&gt;true),


               )


                );


       ?&gt;

action:public function actionNinja($partial = false)

{


       if (&#036;partial) 


	   { 


	           &#036;this-&gt;renderPartial('/selectpatientadmission/index'); 


			   


	   } 


	   else


	   { 


	          &#036;this-&gt;render('/selectpatientadmission/index');


			 


	    } 


}

Hello guys, I’m trying to do something easy but I can’t find the way to do so on Yii Framework.

What I want to do, is open a fancybox frame which takes me to another create.php in another view. What I want to do is that when the user click "save" it save the information and then closes de fancybox frame that I just openned…

Here is how enable the fancybox frame:


<?php 

		$config = array( );

		$this->widget('application.extensions.fancybox.EFancyBox', array( 'target'=>'#antecedentes', 'config'=>$config,));

		echo CHtml::link('Agregar Antecedentes',array('antecedentes/create?valorpasar=$id'),array('id'=>'antecedentes'));

	 ?>

I think there should be a way to give the instruction to the button not to releoad to other page just to close thi fancybox frame.


<?php echo CHtml::submitButton($model->isNewRecord ? 'Guardar' : 'Save'); ?>

Any ideas?