Reputation: 1215
When we use ajax request with PHP, the server side usually end with:
exit( json_encode(somedata) )
and use this response data in client side but what happen when the server side redirect to another page? What happen to ajax callback method?
Upvotes: 0
Views: 46
Reputation: 16675
After redirecting to a different page, all Javascript callback events are unregistered, so the AJAX callback is not being fired anywhere. It's forever lost in the vastness of the cybernetic world.
Upvotes: 1