title: Javascript setTimeout fires as many times in as page loaded by ajax
body: <p>I am executing setTimeout function in a page which loads via ajax call. but if i click the link to load the page again, i afraid the last setTimeout call still continues and the number of intervals of the calls set by setTimeout executes multiple times. </p>
  
  <p>tried this is the remote page:</p>
  
  <pre><code>var RefreshInterval = null;
  clearTimeout(RefreshInterval);
  
  function someFunction()
  {
  ....
      setNextRefresh();
  
  }
  
  function setNextRefresh() {
      console.log(wifiRadarRefreshInterval);
      RefreshInterval = null;
      clearTimeout(RefreshInterval);
      RefreshInterval = setTimeout('someFunction();', 20*1000);
  }
  </code></pre>