Forum Moderators: open
Here's some code:
function ajaxFunction()
{
var xmlHttp;try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX! Please download the latest version of firefox at [getfirefox.com...] .");
return false;
}
}
}
xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4)
{
alert(xmlHttp.responseText) // This returns null.window.setTimeout("ajaxFunction()", 5000);
}
}
xmlHttp.open("GET","livefeed.php",true);
xmlHttp.send(null);
}