Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:31:42+00:00 2026-06-11T10:31:42+00:00

This is my ajax call: <body onload = ${remoteFunction(controller:’accountManagement’, action:’createAccount’, params:[facebookUID: params.facebookUID, gender: params.gender,

  • 0

This is my ajax call: <body onload = "${remoteFunction(controller:'accountManagement', action:'createAccount',
params:[facebookUID: params.facebookUID, gender: params.gender, firstName: params.firstName, lastName: params.lastName])}">

In my controller I have a redirect instruction at the end:

def createAccount = {

    if(user.save(flush:true) == null){
        ... 
    }
    else{
        ....

        for(int i = 0; i < categories.length; i++){
            ...
        }

        println "save to database: successful"

    }

    // Redirect to index action of person controller.
    redirect(controller:'user', action: 'authenticate');


}
`

It does not redirect. Instead, it stays on the same loading page that it started on.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:31:43+00:00Added an answer on June 11, 2026 at 10:31 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jQuery AJAX call with type:'GET' like this: $.ajax({type:'GET',url:'/createUser',data:userId=12345&userName=test, success:function(data){ alert('successful'); }
I'm having hard time with this simple ajax call function sendreq() { $.ajax({ dataType:
I am loading feed-items into a ul using this jQuery .ajax() call, which I
I am making ajax call like this $(document).ready(function() { var abc = new Array();
I have the following ajax call var prev_sibling = $(this).prev().attr(value); var next_sibling = $(this).next().attr(value);
I am using an ajax call which is as follows var ID=$(this).attr('id'); var input=$(#input_+ID).val();
On my main page I have this jquery code which does an ajax call
A situation I ran across this week: we have a jQuery Ajax call that
I have a web service that returns this string via the jQuery $.ajax() call
I am including a jsp fragment by making an ajax call. Now this jsp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.