Hello,
I create dynamic image (.png).
It takes 10-15 sec.
I would like to add busy indicator, but I could not make second part work.
Server side is the same, or I have to change it?
I could not find right example.
//first - works
function Refresh()
{
document.getElementById("Image").src = "ViewHandler.ashx";
document.getElementById("Image").style.visibility = 'visible';
}
-----------------------------------------------------
//second - doesn't work
function Refresh()
{
spinner.style.display = 'inline';
var url = "ViewHandler.ashx";
xmlHttp = GetXmlHttpObject(OnComplete);
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
function OnComplete()
{
if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete")
{
document.getElementById("Image").src = xmlHttp.responseText;
document.getElementById("Image").style.visibility = 'visible';
spinner.style.display = 'none';
}
}