cannot use Cjuidialog with xupload

I am trying to use the xupload extention for uploading multiple files inside a Cjuidialog .

my ajax link for Cjuidialog is as shown below


 

<?php

echo CHtml::ajaxLink('Upload',array('upload/index'),array(

                 'success'=>'js:function(data){

                $("#uploadFile").dialog("open");

                  document.getElementById("upload").innerHTML=data;

                                 }'),array('id' => 'ty'.uniqid()));







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

                 'id'=>'uploadFile',

                 'options'=>array(

                   'title'=>'Upload files',

                   'autoOpen'=>false,

                   'modal'=>'true',

                   'width'=>'auto',

                   'height'=>'auto',

               ),

               ));




              echo "<div id='upload'></div>";




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


                                  ?>

My widget view is as shown below




<?php $this->pageTitle=Yii::app()->name; ?>


<h1>Multiple file upload example</h1>


<?php

$this->widget('ext.xupload.XUploadWidget', array(

                                       'url' => Yii::app()->createUrl("site/upload", array("parent_id" => 1)),

                   'model' => $model,

                   'attribute' => 'file',

                                       'multiple' => true,

));

?>

What i need is to use this widget inside the div #upload… Eventhough i am getting the view inside the juidialog the upload is not working . please help…

see http://www.yiiframework.com/forum/index.php/topic/21284-xupload-update/page__view__findpost__p__143349