title: setInterval and window.onload problem
body: <p>I have this code </p>
  
  <pre><code>window.onload = function() {            
      function foo() {
          alert("test");
      }
      setInterval("foo()",500)
  }
  </code></pre>
  
  <p>Which returns undefined...When i use it outside the window.onload it works. Can anyone explain me why?</p>