Reputation: 3
Does anybody know how to redirect parent page from an ajax call? I made an ajax call to the server and from the controller function that handles the call, I want to go to another page. Usually this function updates an element from current page, but in some cases I want to redirect browser to another page.
Upvotes: 0
Views: 2399
Reputation: 57815
If you want to redirect the page loaded in the browser, you probably need to send some sort of message back in the AJAX call that you can then intercept in javascript and then change the browser location
Upvotes: 2
Reputation: 6106
Have you tried to simply send a "Location" header in the AJAX response?
Upvotes: 0