Problem With Periodicalupdater Updating Tree

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



$.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){


             alert("got here");




<div id="treeview">


$this->renderPartial(’/site/_tree’, array(‘treeData’=>$treeData),false,true);




public function actionTekManagerRefresh(){

    &#036;model = new TekManagerForm();

    &#036;data = &#036;model-&gt;getTreeData();

    &#036;treeData['treeData'] = &#036;this-&gt;getDataFormatted(&#036;data['Campus'],0);






// $connection=Yii::app()->db;

 &#036;this-&gt;widget('CTreeView', array(



 //   'url' =&gt; array('FillProjectTree'),


    'htmlOptions'=&gt;array( 'class'=&gt;'treeview-black','href'=&gt;'#')) 



Hi jautry

  1. Try not to open new threads for the same issue. Otherwise we can’t see the previous replies to your problem.

  2. Your controller has partialRender instead of renderPartial; and the $treeData is not passed in an array. Are these just typo’s?

  3. It is very difficult to know what you are doing without more info:

3.1 Try this function:

function update_tree($url)



		var request = $.ajax({ 

		  url: $url,

		  type: "GET",

		  cache: false,

		  dataType: "html" 



		request.done(function(response) { 


			request = null;



		request.error(function(jqXHR, status, error){

			alert (error + ": " + jqXHR.responseText);

			request = null;





		request = null;

		alert(error.message + '. ' + 'Please contact us.');

		return false;



3.2 Or else, this is what I am doing:

My tree is inside an iframe.

When I want to update my tree I do this in a js function: $(’#iframe1’).attr(“src”, $url);

This reloads the iframe’s source. The $url points to my controller action that rendered the entire view in the first place. So each time the entire view is replaced - not just the <div id=“treeview”>.

Note that the code ‘in the iframe’ uses different js than the code ‘underneath the iframe’. Take a look at this wiki. If you don’t want to use the dialog, you can just use the iframe.