I am trying to update a view with a periodic jquery timer. The jquery routine is routing to a site/controller/action URL which then updates the data in the action routine. I tried to call the render with the new data to update a CGridView, but nothing seems to update even though I see the data going to the widget is indeed different. What is the best way to refresh a page of widgets on a timer?
<?php $url = Yii::app()->createUrl(‘tekmanager/tekmanagerrefresh’);?>
<script>
function updater(){
$.PeriodicalUpdater("<?php echo $url;?>", {
method: 'post', data: '', minTimeout: 1000, maxTimeout: 2000,
multiplier: 2, type: 'text', maxCalls: 0, autoStop: 0},
function(d, success, xhr, handle){
$.fn.yiiGridView.update('view', {data: d});
});
}
</script>