Hi All,
I have a problem with renderPartial.
I have controller with action render the view partially.
$this->renderPartial('myview);
in my view, there is a widget let say myWidget
$this->widget(‘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’, "
setInterval(function(){
$('#wiget').load('?r=chart/refresh');
},5000);
");
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.