Dear reader,

i would like to indicate that an ajax query is in progress with one of those animated gifs.
In theory the image is hidden, until ajax is working and waiting for a response. When the response comes it is hidden again.

I have tried several approaches to this since now without success.

I started with this routine, a select-form that fires the ajax onchange and returns db-values to a specified section. Right behind the select field i would like the indicator to appear.

My question: How to i show/hide the animated gif in this case?

Thanks for your patience.


<img src="loading2.gif" alt="Ajax Indicator" id="hide" style="visibility:hidden" />


document.getElementById('hide').style.visibility = "visible";
if (xmlhttp.readyState==4 && xmlhttp.status==200)
document.getElementById('hide').style.visibility = "hidden";