I am stuck on trying to get a treeview to update on a timer. The alert happens on changes from the jquery, but the div update never seems to happen. Not sure what is going on, and out of ideas. THX
//View
$(document).ready(function(){
$.PeriodicalUpdater( "<?php echo $url ?>",{
'method' : 'post',
'data' : '',
'maxTimeout' : 1000,
'minTimeout' : 2000,
'multiplier' : 2,
'maxCalls' : 0,
'autoStop' : 0,
'type' : 'json',
'cookie' : {}
},
function(remoteData, success, xhr, handle){
$("#treeview");
alert("got here");
});
});
</script>
<div id="treeview">
<?php
$this->renderPartial(’/site/_tree’, array(‘treeData’=>$treeData),false,true);
?>
</div>
//Controller
public function actionTekManagerRefresh(){
$model = new TekManagerForm();
$data = $model->getTreeData();
$treeData['treeData'] = $this->getDataFormatted($data['Campus'],0);
$this.partialRender('/site/_tree',$treeData,false,true);
}
//_tree.php
<h3>Project</h3>
<?php
// $connection=Yii::app()->db;
$this->widget('CTreeView', array(
'id'=>'tree',
'data'=>$treeData,
// 'url' => array('FillProjectTree'),
//'collapsed'=>false,
'htmlOptions'=>array( 'class'=>'treeview-black','href'=>'#'))
);
?>