I am making an ajax call with the following script:
window.onload = function() {
if (!session) {
layoutType = document.documentElement.clientWidth;
var xmlhttp;
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
}
else
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
window.location.reload();
}
}
xmlhttp.open("POST","core/session.php?bW=" + bW,true);
xmlhttp.send();
}
}
I want to insert a loading image and some text while the pahe loads. How ca I do that?
I want to insert the following image link and text:
<img src="cdn/images/ajax-loader.gif" />
<h3>Please wait while we load</h3>
Please help.
you can add an image to the loading are when ajax loads it will basically overwrite your image
the ajax loader
for instance here is the ajax based on the one you are using