It works under mozilla but not ie
the tpl file::
[HTML]</html>
<head>
<script language="javascript" type="text/javascript">
{literal}
var c=0;
var t;
window.onload = function(){
timedCount();
}
function timedCount()
{
t=setTimeout("timedCount()",3000);
findprov('tes');
}
var xmlHttp
function findprov(divtowrite)
{
DTW=divtowrite;
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="tstudents.php";
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById(DTW).innerHTML=xmlHttp.res ponseText ;
}
}function GetXmlHttpObject()
{
var xmlHttp=null;try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
{/literal}
</script>
<meta http-equiv="Content-Language" content="en-gb">
</head>
<body>
<table border="0" width="100%" id="table1">
<tr>
<p> <span id="tes"> </span> </p></td>
</tr>
</table>
</body>
</html>[/HTML]
the php file tstudents.php
Expand|Select|Wrap|Line Numbers
- <?php
- define('AT_INCLUDE_PATH','../');
- include_once (AT_INCLUDE_PATH.'include/ini.php');
- $students = new DataObjects_stu;
- $students->query("select * from {$students->__table} ");
- $students->whereAdd("Id != 12345678900 ");
- $number_of_rows = $students->find();
- echo "<font color=blue> <b>". $number_of_rows." </b> students </font>";
- ?>
Any help will be appreciated
Thanks