how to make ajax submit redirect?
in php, if i submit via ajax, how to redirect to other page when resu开发者_如何学Pythonlt comes back?
do it in javascript; after you get the result back window.location = "newpage.php"
If you're using AJAX to redirect pages with Javascript, you're losing all the benefits of AJAX, consider simplifying your system so that it just submits its data with a regular POST.
If you're doing it asynchronously because you want the page to redirect on some specific event that the user has no control over, don't. Instead do something similar to StackOverflow - pop up a little status bar at the top or bottom (or side) of the page with a link for the user to click when they're ready.
精彩评论