title: Display loading image while ajax fetches file content
body: <p>i am new to ajax and read some tuts to make a lil script which has multiple buttons and on click each will load a php file in a specific div. for that im using this  </p>
  
  <pre><code>function loadXMLDoc()
  {
  var xmlhttp;
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
     document.getElementById("1").innerHTML=xmlhttp.responseText;
          }
    }
  xmlhttp.open("GET","feedchck.php",true);
  xmlhttp.send();
  }  
  </code></pre>
  
  <p>Action Button  : </p>
  
  <pre><code>&lt;button type="button" onclick="loadXMLDoc();"&gt;Request&lt;/button&gt;
  &lt;div id="1"&gt;asdf&lt;/div&gt;
  </code></pre>
  
  <p>I made it to this part and on click the php file is loading perfectly. but coz it takes time to process it shows blank area. so is it possible to show a loading image or text while it processes and after completion it will hide the image and display file content?<br>
  Help is appreciated :}<br>
  cheers</p>