title: Javascript Call function after window.open
body: <p>I'm trying to call a function after my window.open function has fully loaded.</p>
  
  <p>However, using the onload function is being called too soon. The URL that's being hit opens an excel spreadsheet and can take from 2 secs to 1 min to download.</p>
  
  <p>The onload function is being called as soon as the window.open function has been called. However, I need to know when the excel doc has been opened - not when the URL was hit. </p>
  
  <p>I've tried setting an interval but that's not being called:</p>
  
  <pre><code>w = window.open(url,'_parent',false);   
  
  w.onload = function(){
      console.log('here');
      setInterval(function(){
          alert('Hi');
      },10);
  </code></pre>