0

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.

http://www.w3schools.com/ajax/ajax_database.asp

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.

Edited by Crocodili: n/a

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Crocodili
0

Solved:

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

and

xmlhttp.onreadystatechange=function()
{
document.getElementById('hide').style.visibility = "visible";
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
document.getElementById('hide').style.visibility = "hidden";
}
}

Edited by Crocodili: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.