I am confused right now, and there will be test about ajax tommorrow..
And i bumped into this getXMLHTTP() function in one of the code that my professor gave me and i not sure what it does exactly.I mean because i also see in the other code, that people are using getXMLHttpRequest() in their ajax code and this make me more confused.
I have tried finding it on the net but theres no one yet given explanation on this. So i hope someone could give me explanation on this.
By the way, below this is the example of code that using this function :
function getInfo(strURL)
{
var req = getXMLHTTP();
if (req)
{
req.onreadystatechange = function()
{
if (req.readyState == 4)
{
if (req.status == 200)
{
document.getElementById("lect").innerHTML=req.responseText;
}
else
{
alert("There was a problem while using XMLHTTP:\n" + req.statusText);
}
}
}
req.open("GET", strURL , true);
req.send(null);
}
}
thank you in advance :)