I have this function for my AJAX:
function firstcheck() {
dtext = "";
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
dtext = xmlhttp.responseText;
}
}
xmlhttp.open("POST","/file.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
var tkey = "";
xmlhttp.send("tid="+ tkey +"");
}
Now, I want to add a bit of code that does something if ACTIVEX is not available or if the browser can’t support AJAX. How can I edit this to allow for that?
Cheers!
Ryan