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

Reply via email to