Is there a way to put a wit image (ie wait.gif) while using XMLHttpRequest?
I have a ‘hidden’ div called ‘loader’. Where do I change the display to block, and back to none?
Here is basically my code:
var xmlhttp;
if (window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
}
else {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
///Do Something with answer
}
}
xmlhttp.open("GET","gtservice01.php?s="+req01,true);
xmlhttp.send();
I am not ready to take the jquery jump yet.
Thx
R
1 Answer