How To Move From One Cjuidialog To Another Cjuidialog

I created a file upload form with Cjuidialog box

this is the dialog box code.


<?php 

    $this->beginWidget('zii.widgets.jui.CJuiDialog',array(

                    'id'=>'uploadform',

                    'options'=>array(

                        'title'=>Yii::t('uploadfile_list','Upload files'),

                        'autoOpen'=>true,

                        'modal'=>'true',

                        'width'=>'50%',

                        'height'=>'550',

    	                

                    ),

    				

                    ));

    ?>

    

    <?php $form=$this->beginWidget('CActiveForm', array(

    	'id'=>'import-declaration-file-upload-form',

    	'enableAjaxValidation'=>false,

        'enableClientValidation'=>true,

    	'htmlOptions' => array('enctype' => 'multipart/form-data'),

    )); ?>

    

    

    	<div style="overflow-y: auto; width:100%; height: 330px;">

    	<table id="attach_list" name="attach_list" class="table table-bordered table-striped table_vam" >

    		<tr>

    			<th width="95%">File Name</th>                

    			<th>&nbsp;</th>

    		</tr>

    		<tr class="template_attach">

    			<td>

    				<input type="file" name="attach_file[]" class="attach-file" style="border: none;" /><br />

    				File type must be : <span style="color:red">xml</span>

    			</td>			    

    			<td style="text-align: center; vertical-align: middle;"><a href="#" class="attach-delete"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/assets/delete.png" width="15px" title="Delete attachment" /></a></td>

    		<tr>

    	</table>

    	</div>

    	<div style="margin-top: 20px;" align="right">

            <?php $imghtml=CHtml::image(Yii::app()->request->baseUrl.'/images/assets/attachment-icone-7052-96.png','', array('style'=>'margin: 5px 0;', 'id' => 'submitbutton')); ?>

    		<?php echo CHtml::link($imghtml,'#',array('class'=>'btn btn-primary', 'id'=>'attach-item','title'=>'Attachment' ,'style'=>'width:25px')); ?>

    	</div>

    	<div class="row buttons" style="margin-top: 20px; margin" align="center">

    		<?php echo CHtml::submitButton($model->isNewRecord ? 'Upload and Marge' : 'Update Cover & Preview', 

    				array('class'=>'btn btn-primary','style'=>'margin-right:10px','id'=>'submitbutton', 'success'=>'function(){$("#uploadform").dialog("close");')); 

    		?>

    		

    		<span style="margin-left:20px;"><?php echo CHtml::link('Cancel',array('index'), array('id'=>'Cancel','name'=>'Cancel')); ?></span>

    	</div>

        

    <?php $this->endWidget(); ?>

    

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

After clicking the "Upload and Merge" submit button, doing the process and want to open another dialog box as follow.

But the background is gone away and the dialog box is display not looking good.

How should I do? How to move from one cjuidialog to another cjuidialog after processing.

The first dialog adds a layer under it with 50% opacity. The second one does the same, thus making everything hidden. I think there’s an option to set that, check the docs for jQuery UI dialog.