Thats the thing, I don't want the results coming back in order. I am trying emulate them coming back unordered, but they are coming back ordered. I was digging deeper yesterday and discovered the results are linked to an aspsessionid cookie that is created from the asp pages (don't fully understand it yet) but through elimination I determined if I delete this cookie everytime it is generated, then the AJAX calls behave normally - the calls work asyncronously. If the cookie exists then the AJAX calls act syncronously which is not what I want. If anybody has any experience in this.....
On Aug 10, 2:32 pm, MorningZ <morni...@gmail.com> wrote: > "Am I missing something here????" > > Yes, you are assuming that the results will come back in the order > called, which totally is not the case.... the success function simply > says "when you return from this async call, run this", there is > nothing in the logic about "order" > > There is an older plugin that could be used "Ajax Queue" > (http://www.google.com/search?q=ajax+queue), or you can adjust your code > accordingly > > On Aug 10, 8:34 am, sak <saks...@gmail.com> wrote: > > > Hi there > > > I am a newbie to using jquery and have been exploring it developing a > > new app. At the moment I have a number of AJAX calls to the server > > which I have been queueing in an array and using a single $.ajax call > > to handle all of them. However I know about the browser limitations of > > two calls per page (at the same time and want to implement this to > > speed up page updating). To test concurrent ajax requests I have setup > > various asp pages to with delays 1sec, 5sec, 10sec etc etc. and a test > > html file with the follwing javascript > > > $('#btn1', '#divTest').click(function(event){ > > $.ajax({ > > url: 'include/asp/test/one_secs.asp', > > type: 'GET', > > cache: 'false', > > processData: false, > > success: function(data, txtStatus) { > > alert(data); > > }, > > });}); > > > $('#btn10', '#divTest').click(function(event){ > > $.ajax({ > > url: 'include/asp/test/ten_secs.asp', > > type: 'GET', > > cache: 'false', > > processData: false, > > success: function(data, txtStatus) { > > alert(data); > > }, > > }); > > > }); > > > so now when I click on btn1 it returns the call after 1sec as it > > should, and the 10sec button after 10 seconds all good. When I click > > the 10 seconds first, quickly followed by the 1second button I expect > > the 1second to return first followed by the 10 second... > > > This doesn't happen it still processes the 10second first and returns > > the 1second after the 10second is finished. > > > Am I missing something here???? I have seen something in other forums > > that suggest it may be server related (server queuing the > > requests) ????? > > > Also I apologise if this has been discussed before (I have been > > searching all morning for a solution), buthaven't found anything...... > > > any help would be brilliant