title: How can i clearInterval from a popup window
body: <p>SOLUTION: (Can't post a solution on my own question for some reason...)</p>
  
  <p>I found a solution to my problem by creating a function in my index file which I then called from my popup window.</p>
  
  <p>index:</p>
  
  <pre><code>function clearRefreshStatusInterval() {
    clearInterval(refreshStatusInterval);
    refreshStatusInterval = setInterval(function(){
      console.log("REFRESH");
    },1000);
  }
  </code></pre>
  
  <p>popup:</p>
  
  <pre><code>$(window).mousemove(function() {
    window.opener.clearRefreshStatusInterval();
  });
  </code></pre>
  
  <hr>
  
  <p>QUESTION:</p>
  
  <p>I am trying to clear a setInterval-timer from mousemovement in a popup window. It works well in the index file.</p>
  
  <p>This code is in my index file (does work):</p>
  
  <pre><code>var refreshStatusInterval = setInterval(function(){
    refreshStatus();
  },10000);
  
  $(window).mousemove(function() {
    clearInterval(refreshStatusInterval);
    refreshStatusInterval = setInterval(function(){
      refreshStatus();
    },10000);
  });
  </code></pre>
  
  <p>This code is in my popup window (does not work):</p>
  
  <pre><code>$(window).mousemove(function() {
    window.opener.clearInterval(window.opener.refreshStatusInterval);
  
    window.opener.refreshStatusInterval = window.opener.setInterval(function(){
      window.opener.refreshStatus();
    },10000);
  });
  </code></pre>
  
  <p>The timer wont reset for me, anyone know how to do this?</p>