PDA

View Full Version : can ext do this?panel to Refresh it self avrey 30 sec?



koko2589
12 Apr 2009, 5:39 AM
like this?

http://www.itoto1.com/desktop/chat.html

i whant to put chat insid panel
the panel will Refresh evrey 30 sec?



<table class=TopRefresh align=center width=216 cellspacing=0 cellpadding=0 border=0>
<tr>
<td align=center><a class=TopRefresh href="javascript:window.location.reload()">???? ?????</a> |</td>

<td align=center>

<script language="JavaScript">
//configure refresh interval (in seconds)
var countDownInterval=30;
//configure width of displayed text, in px (applicable only in NS4)
var c_reloadwidth=200
</script>

<ilayer id="c_reload" width=&{c_reloadwidth}; >
<layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer>
</ilayer>
<script>
var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location.reload()
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('<b id="countDownText">'+countDownTime+'</b>')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}
function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('<b id="countDownText">'+countDownTime+'</b>')
countDown()
}
if (document.all||document.getElementById)
startit()
else
window.onload=startit
</script>
</td>
<td align=center>???? ?????? ????</td>

</tr>
</table>

<div><iframe frameborder="0" width="216" height="203" src="http://www6.cbox.ws/box/?boxid=39633&amp;boxtag=bmn5sl&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#DBE2ED 1px solid;" id="cboxmain"></iframe></div>
<div><iframe frameborder="0" width="216" height="75" src="http://www6.cbox.ws/box/?boxid=39633&amp;boxtag=bmn5sl&amp;sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#DBE2ED 1px solid;border-top:0px" id="cboxform"></iframe></div>
</div>
<!-- END CBOX -->

aconran
12 Apr 2009, 7:29 AM
Take a look at the Ext.Updater class and the startAutoRefresh method.

Better yet and far more flexible take a look at the Ext.TaskMgr class which is an instance of an Ext.TaskRunner.