I'm experimenting with using a AJAX style "processing " icon. The
process I'm running in the background with xmlHttp is intensive and
takes a 5--10 secs to complete. Instead of my processing icon
appearing in the page, the page just freezes during the process until
it's finished. Is this the best way to display this kind of icon?
What can I do so this works right? Thanks
function stateChanged()
{
if (xmlHttp.readyS tate == 0)
{
document.getEle mentById("lblRe sults").innerHT ML = "<img
src='mozilla_bl u.gif' alt='loading..p lease wait'>"; //loading
}
else if(xmlHttp.read yState == 1)
{
document.getEle mentById("lblRe sults").innerHT ML = "<img
src='mozilla_bl u.gif' alt='loading..p lease wait'>"; //loaded
}
else if(xmlHttp.read yState == 2)
{
document.getEle mentById("lblRe sults").innerHT ML = "<img
src='mozilla_bl u.gif' alt='loading..p lease wait'>"; //interactive
}
else if(xmlHttp.read yState == 3)
{
document.getEle mentById("lblRe sults").innerHT ML = "<img
src='mozilla_bl u.gif' alt='loading..p lease wait'>";
}
else if (xmlHttp.readyS tate==4 || xmlHttp.readySt ate=="complete" )
{
document.getEle mentById("lblRe sults").innerHT ML = "";
<span id="lblResults " name="lblResult s"></span>