Grails: Page Won't Redirect After Completed Ajax Call
This is my ajax call:
Solution 1:
Browsers won't redirect if an AJAX call returns a redirect. If you want to send the user to a new page after an AJAX call, you'll need to do so yourself in Javascript. Example:
def url = createLink(controller: 'user', action: 'authenticate')
render(contentType: 'text/html', text: "<script>window.location.href='$url'</script>")
Ensure the AJAX response gets rendered by the browser. With the grails remoteFunction
tag you should specify an element to update with the update
attribute.
Post a Comment for "Grails: Page Won't Redirect After Completed Ajax Call"