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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:39:53+00:00 2026-06-16T16:39:53+00:00

I have a pretty basic scenario: Run 3 Google maps place URLs and show

  • 0

I have a pretty basic scenario: Run 3 Google maps place URLs and show results on every success

This is what I have so far:

 var  values = ["url1", "url2", "url3"];

  values.forEach(function(value, i) {

     var jsonReq = JSON.stringify({
        action: 101,
        supported: value 
    });

    ...

     $.ajax({
        type: "POST",
        url: "data.ajax.php",
        dataType:"json",
        data:{
            data:jsonReq
        },
        success:function(data){
           // parse results
           ....

        }
    }); 

  });

The problem is I run in loop all 3 URLs without waiting on success.

I want to send next request only when get response (callback) from previous one.

Any suggestions?

Thanks,

  • 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-16T16:39:54+00:00Added an answer on June 16, 2026 at 4:39 pm

    in complete function in ajax request call next request

    var  values = ["url1", "url2", "url3"];
    
      values.forEach(function(value, i) {
    
         var jsonReq = JSON.stringify({
            action: 101,
            supported: value 
        });
    
        ...
    
         $.ajax({
            type: "POST",
            url: "data.ajax.php",
            dataType:"json",
            data:{
                data:jsonReq
            },
            success:function(data){
               // parse results
               ....
    
            },
          complete: function(){
    
          }
       }); 
    
      })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize this question is pretty basic, but I'm really stuck. I have a
I am new to WCF so I think this is pretty basic. I have
This is a pretty basic scenario but I'm not finding too many helpful resources.
This is pretty basic question around unit testing. I have a method e.g. GetOrderDetails
I have some pretty basic jQuery code: ... $(this).find('img').load(function(){ loadedImages++; if(loadedImages == $this.find('img').length){ ...
I have a pretty basic page that shows every five minutes of the day
I have a pretty basic X11 app that I run on Linux that I'm
I have a pretty basic query, but I'd like it to return the results
I have this pretty basic view: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent
Its a pretty basic scenario. I have a table with a Geography datatype in

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.