AJAX - Get response URL after redirect
- by Stian
Hello,
I was wondering if there is a way to get the URL of the returned resource after a AJAX call in JavaScript?
I want to use this with a form, which is in "mysite.com/users/add.html". This is a Spring MVC controller. If the validation of the form fails the controller will return the "users/add" view, but if the validation is OK it will do a redirect to "mysite.com/users/index.html", using
return new ModelAndView(new RedirectView("/users/index.html"));
Is there a way in JavaScript to find the URL of the returned page?
Thanks,
Stian