Refresh automaticly a part of web page

Hello !

I comme back with my problem of refresh.

I display the result of a request Sql in a <div> + <table>.

The sql table moves regularly.

I would like update the div automatically every second and the rest of the page (input …) must be used simultaneously

How can I do that?

I suppose you could use something like JHeartbeat and have it call an action that regenerates the table:



Also check out jQuery Timers:

I can't seem to get to the jquery plugin repo atm, but Timers is a little more robust.


After several tests, I use 'jQuery.refreshDiv.js'


Sorry it's in French, but it's better for me

I use it like this:

in the first view myview/appel





	  '$("#appel-list").refreshDiv("index.php?r=myview/appels&id=pk_appels'", 2*1000) ;',




<div id="appel-list">

	<?php $this->renderPartial('appels',array('form'=>$form, 'appelList'=>$appelList)); ?>



in the second view myview/appels, for each refresh



	  // my list



in the CController


	public function actionAppels()





	public function actionAppel()



		$this->render('appel',array('form'=>$form, 'appelList'=>$this->loadAppelList()));



It's running good