How do I load an event after a redirected page has finished loading, following an ajax call?
For the sake of simplicity, here is some sample 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
}
});
the "alert" box does not load for me, but the redirect works.