AJAX - Get response URL after redirect
Posted
by Stian
on Stack Overflow
See other posts from Stack Overflow
or by Stian
Published on 2010-04-13T09:51:09Z
Indexed on
2010/04/13
11:32 UTC
Read the original article
Hit count: 377
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
© Stack Overflow or respective owner