widget in renderPartial

Hi All,

I have a problem with renderPartial.

I have controller with action render the view partially.


in my view, there is a widget let say myWidget


My problem is, I need to refresh the page every 10 seconds by using ajax, so I have this code on my page :

Yii::app()->clientScript->registerScript(‘script’, "





I was succeed to load that page for the first time, but when it refresh, there is nothing to displayed.

Anyone can help ?

I have tried $this-renderPartial('myview,null,false,true), or all the combination. still not work.

It seems the problem on the javascript, looks like it loaded duplicate.

you put #wiget instead of #widget

No, that’s not the problem. #wiget is my div id to update when the ajax loaded.

Any other possibilities ? thanks anyway

$('#wiget').load('<?= $this->createUrl("chart/refresh") ?>');