I'm looking to incorporate a loading image while Ajax is in progress. Currently, my code looks like this:
if(xml.readyState == 1) {
divPrincipal.innerHTML = "<img src='/RH/images/loading.gif' />"
}
if(xml.readyState == 2) {
divPrincipal.innerHTML = ""
}
While it works fine, the issue is that the loading image doesn't show up where I want it to.
Is there a way to position the loading image precisely at the center and on top of everything else? Or do I need to insert a div at the specific location for the image?
Thank you!