load an event on a finished redirected page after an AJAX call
<p>How do I load an event after a redirected page has finished loading, following an ajax call?</p>

<p>For the sake of simplicity, here is some sample code:</p>

<pre><code>$.ajax({
   type: "POST",
   url: "some_page.php",
   success: function() {
      window.location.href="new_page.php"; // redirect to this page
      $(window).load(function() { alert("test"); }); // load after redirect
   }
});
</code></pre>

<p>the "alert" box does not load for me, but the redirect works.</p>
