title: AJAX at regular interval
body: <p>I'm calling ajax at regular interval (10 sec) from javascript to load data from the db. The response is listed in a small div. But once every 10 sec, I face the problem of interface not responding to user actions like mouse click, key press etc. Any help on this topic would be appreciated.</p>
  
  <p>Code</p>
  
  <pre><code>var onlineLeads = function () {
  var reqst ="";
  var size="";
  var url ="&lt;s:property value="str_applicationPath"/&gt;/Marketing/Online_showNewRequest";   
  xmlHttp.open("POST", url, false);                                           
  xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
  xmlHttp.setRequestHeader("Connection", "close");
  xmlHttp.onreadystatechange = function() {//Call a function when the state changes.
  if(xmlHttp.readyState == 4 &amp;&amp; xmlHttp.status == 200) {
  
  //Code for display
  
  }
  }
  xmlHttp.send(); 
  setTimeout(onlineLeads, 15000);
  };
  setTimeout(onlineLeads, 1000);
  </code></pre>