Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
var xmlHttp
function getchat() {
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="chat.php";
xmlHttp.onreadystatechange=updated;
xmlHttp.open("GET",url,true);
xmlHttp.send(null); }
function updated() {
if (xmlHttp.readyState==4) {
document.getElementById("chat").innerHTML=xmlHttp.responseText;
setTimeOut(getchat, 30000); }}
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;
}