Hello yii friends!!I have problem with ur extension jquery-gmap. when I call function $marker->capturePosition.CWidget are error like

CMultiFileUpload can’t upload multiple file it can only upload 1 file.

CJuiDialog not open dialog.

How to solve this problem??? Plz help me!! sorry for my bad english. :(

taken from

hope this will help you

my example is how to upload my product images to my images directory created in my application path(in protected folder)

in my view file put this code as form field

here i use only 3 fields, name field, images field and price field.

<!–? php $form=$this->beginWidget(‘CActiveForm’, array(



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

)); ?>

<p>Fields with <span>*</span> are required.</p>

<!–?php echo $form->errorSummary($model); ?>


<!–?php echo $form->labelEx($model,’name’); ?>

<!–?php echo $form->textField($model,’name’,array(‘size’=>60,’maxlength’=>255)); ?>

<!–?php echo $form->error($model,’name’); ?>



<!–?php echo $form->labelEx($model,’product_images’); ?>

<!–?php $this->widget(‘CMultiFileUpload’,array(





‘denied’=>’type is not allowed’, //message that is displayed when a file type is not allowed

‘duplicate’=>’file appears twice’, //message that is displayed when a file appears twice


)); ?>

<!–?php echo $form->error($model,’product_images’); ?>



<!–?php echo $form->labelEx($model,’price’); ?>

<!–?php echo $form->textField($model,’price’,array(‘size’=>10,’maxlength’=>10)); ?>

<!–?php echo $form->error($model,’price’); ?>



<!–?php echo CHtml::submitButton($model->isNewRecord ? ‘Create’ : ‘Save’); ?>


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

</div><!– form –>

this widget send an array of uploaded files

the name of that array we define in ‘name’ element.

we can catch up it in the controller using

CUploadedFile::getInstancesByName() method

$product_images = CUploadedFile::getInstancesByName(‘product_images’);

this is return an array of CUploadedFile instances

we can access each instance through foreach loop

foreach ($primary_product_image as $image => $pic) {

we can save the current image at any where



hello kumarkulandai !! thank for ur reply!! My problem is jquery-gmap when I use it without call this function

$marker->capturePosition(); CMultiFileUpload it can’t upload multiple image mean I can upload only 1 image.

this my view


		  $this->widget('CMultiFileUpload', array(






			 'duplicate'=>'file appears twice', 

			 'denied'=>'type is not allowed',

		    /* 'options'=>array(

			'onFileSelect'=>'function(e, v, m){ alert("onFileSelect - "+v) }',

			'afterFileSelect'=>'function(e, v, m){ alert("afterFileSelect - "+v) }',

			'onFileAppend'=>'function(e, v, m){ alert("onFileAppend - "+v) }',

			'afterFileAppend'=>'function(e, v, m){ alert("afterFileAppend - "+v) }',

			'onFileRemove'=>'function(e, v, m){ alert("onFileRemove - "+v) }',

			'afterFileRemove'=>'function(e, v, m){ alert("afterFileRemove - "+v) }',






$mod = new TblHotel;




$gmap = new EGmap3Widget();

$gmap->setSize(600, 400);


// base options

$options = array(

    'scaleControl' => true,

    'streetViewControl' => false,

    'zoom' => 1,

    'center' => array('12.57601','104.47998'),

    'mapTypeId' => EGmap3MapTypeId::ROADMAP,

    'mapTypeControlOptions' => array(

        'style' => EGmap3MapTypeControlStyle::DROPDOWN_MENU,

        'position' => EGmap3ControlPosition::TOP_RIGHT,


    'zoomControlOptions' => array(

        'style' => EGmap3ZoomControlStyle::SMALL,

        'position' => EGmap3ControlPosition::TOP_LEFT






$marker = new EGmap3Marker(array(



 'icon' => array(

				'url' => 'http://google-maps-icons.googlecode.com/files/hotel.png',

				'anchor' => array('x' => 1, 'y' => 25),

			//'anchor' => new EGmap3Point(5,5),



//$marker->address =$model->state." ".$model->city." ".$model->address2." ".$model->address1." ".$model->name;

$infoWindow = new EGmap3InfoWindow(

    array('content'=>'hello world!!')

	// array('content'=>$bmodel->name.",".$bmodel->address1.",".$bmodel->address2.",".$bmodel->city.", ".$bmodel->state)


$polyOptions = array(

    'fillColor' => 'yellow',

    'strokeColor' => 'red'


$circleOptions = array_merge(




$circle = new EGmap3Circle($circleOptions);
















//foreach($bmodel->latitude as $l)


 	 $marker->latLng = array($bmodel->latitude,$bmodel->longitude);

	 $infoWindow->latLng = array($bmodel->latitude,$bmodel->longitude);

	 $circle->latLng = array($bmodel->latitude,$bmodel->longitude);