Hi I have this script wich refreshes my page every 5 minutes..
Look the function setTimeout("beginrefresh()",75000)
<html>
<head>
<link href="style.css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF">
<script language="javascript">
var limit="0:5"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]60+parselimit[1]1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload() && window.scroll(0,20000)
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
setTimeout("beginrefresh()",75000)
}
}
window.onload=beginrefresh
</script>
<?php
if (@$_SESSION['wteam']!='sdg')
{
echo '<script languaje="JavaScript">';
echo 'self.close()';
echo '</script>';
exit;
}
include_once("commonsdg.inc");
$query="select c.customer_id,'--->',a.desc_error,'Status --->',c.call_status,'Call Id --->',b.call_id from sdg_error_messages a,call_errors b, sdg_calls c where (a.type_system_id = b.type_system_id and a.type_error_id = b.type_error_id) and (b.call_id = c.call_id and c.call_status in ('Open','New')) and b.cod_error = a.cod_error order by b.call_id desc";
$result=mysql_query($query, $link);
$num_rows=mysql_num_rows($result);
while($fresult=mysql_fetch_array($result))
{
print "<font style='font-size: 10pt' color='#990000'><B> $fresult[0] $fresult[1]";
print "<font style='font-size: 10pt' color='#FF0000'> $fresult[2]";
print "<font style='font-size: 10pt' color='#990000'> $fresult[3]";
print "<font style='font-size: 10pt' color='#FF0000'> $fresult[4]";
print "<font style='font-size: 10pt' color='#990000'> $fresult[5]";
print "<font style='font-size: 10pt' color='#FF0000'> <a href=# onclick=window.open('browsecall.php?wcall=" . $fresult[6] ."','browse','toolbar=0,menubar=0,height=350,width=700,scrollbars=yes')" .">" . "$fresult[6] </font></a></font></B><br>";
}
?>
</body>
</html>