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 6030965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:06:54+00:00 2026-05-23T05:06:54+00:00

I have an procedure that runs throught 5 consecutive steps, and in my page,

  • 0

I have an procedure that runs throught 5 consecutive steps, and in my page, I’m calling an ajax method for each of them.

The idea is to run the first, if all is ok the second, and so on.

My code is:

$("#foo").click(function(){
    $.ajax({
        url: 'ajax.php',
        async: false,
        data: {
            step: 1
        },
        dataType: 'json',
        type: 'GET',
        success: walk_through(data)
    });
});

function walk_through(data)
{
    if(data.status == 'ok')
    {
        if(data.next_step == 'end')
        {
            // All steps completed
        }
        else
        {
            // Current step completed, run next one
            $.ajax({
                url: 'ajax.php',
                async: false,
                data: {
                    step: data.next_step
                },
                dataType: 'json',
                type: 'GET',
                success: walk_through(data)
            });
        }
    }
    else
    {
        alert("Error.");
        console.log(data);
    }
}

Im getting “too much recursion” error, even if my ajax calls are set as syncronous.. why?

  • 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-05-23T05:06:54+00:00Added an answer on May 23, 2026 at 5:06 am

    Change

    success: walk_through(data)

    To

    success: walk_through

    You want the function walk_through to be the success handler, but you don’t want to call the function immediately.

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

Sidebar

Related Questions

I have a stored procedure that runs custom backups for around 60 SQL servers
I have an SQL CREATE PROCEDURE statement that runs perfectly in my local SQL
I have an app that runs a stored procedure in SQL Server, checking the
I have a procedure that is run for a lot of items, skipping over
I have an procedure that runs on a control's AfterUpdate event: Private Sub cmdDelCountry_AfterUpdate()
I have a stored procedure that runs the following: 'ALTER LOGIN ' + @Login
I have a script that runs a stored procedure in my SQL server database,
I have been running up a stored procedure that runs several separate update and
My limited SQL knowledge prompted this post! I have a stored procedure that runs
I have a loooooong stored procedure that runs about 15 select statements across different

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.