Two Cjuidialog Issue

Hi, i have two CJuiDialog’s one contains browse option and submit button and other has grid, after clicking first dialog’s submit button i want to update second dialog’s grid (clarify with attached image)

My View code:


<?php

	echo CHtml::form('','post',array('enctype'=>'multipart/form-data'));

    echo CHtml::activeFileField($model, 'name');

    echo CHtml::button( 'Upload',array('submit' => array('baseContact/SaveAttachDocuments'))); 	

    echo CHtml::endForm();

 ?>

My Controller Code:


public function actionSaveAttachDocuments()

	{

		

            $model=new DocumentAttachmentModel();

            $filename =CUploadedFile::getInstance($model,'name');

            $model->type =pathinfo($filename, PATHINFO_EXTENSION);

            $model->name =pathinfo($filename,PATHINFO_FILENAME);

            $model->save();


           [b]// What to do here?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />???[/b]

		

	}

Hi,

This will close the small popup. change id with your id name

[size=2]$("[id^=userDialog]").dialog("close");[/size]

Use below code to refresh your grid

$(’.search-form form’).submit(function(){

&#036;.fn.yiiGridView.update('programm-grid', {


	data: &#036;(this).serialize()


});


return false;

});

thanks working!!!!