I am trying to add a loading image while Ajax is working. I already have this:
if(xml.readyState == 1) {
divPrincipal.innerHTML = "<img src='/RH/images/loading.gif' />"
}
if(xml.readyState == 2) {
divPrincipal.innerHTML = ""
}
And it works very well, but it doesnt place the image where I want.
Is there anyway to put the loading image exactly on the center and in front of everything? or should I insert a div on the position where i want the image to be?
Thanks a lot!
Apply these styles to
divPrincipal: