hi all,
i'm using prototype to perform 3 ajax request at the same time in the
same page.
the probeleme is i have the impression that my requests are not
asynchronous :
i call first a page named foo.php => do a sleep(40)
and second a page named bar.php => echo "toto";
my javascript code:
function test1(){
var MyAjax = new Ajax.Request(/foo.php,{
method: 'get',
asynchronous:true,
encoding: 'UTF-8',
onSuccess: function(){
return;
},
onFailure: function(){
return;
});
}
function test2(){
var MyAjax = new Ajax.Request(/bar.php,{
method: 'get',
asynchronous:true,
encoding: 'UTF-8',
onSuccess: function(){
return;
},
onFailure: function(){
return;
});
}
<a href="#" onclick="test1();test2();return false;">Start Test</a>
i can see with firebug that the both request take 40s to be executed.
or when i execute only test2(); it take 20ms.
it's like the second request wait for the first to finish executing
together ??!!
any ideas ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---