Solved

post send and wait all at once

Posted on 2015-02-04
1
81 Views
Last Modified: 2015-02-06
Im trying to build an import routine, and want to feedback the results.

I have built the following code on jsfiddle:-
http://jsfiddle.net/jmjc8djn/

I don't understand why all rows fire at the same time, and none respond. From my understanding it should .post the first row then display the results, then the next. However as you can see each Row gets the image and doesnt display anything (even though on jsfiddle it should just display and error saying it couldnt find it).

Any ideas what Im doing wrong?

Thank you
0
Comment
Question by:tonelm54
1 Comment
 
LVL 6

Accepted Solution

by:
rjohnsonjr earned 500 total points
ID: 40588956
You have to set the aync setting to false:

http://api.jquery.com/jquery.ajax/

async (default: true)
Type: Boolean
By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().


by default the call is asynchronous so it doesn't wait for a response.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question