Multible jquery .load() methods not running concurrently in MVC 2
Posted
by Boob
on Stack Overflow
See other posts from Stack Overflow
or by Boob
Published on 2010-06-08T13:58:20Z
Indexed on
2010/06/08
14:02 UTC
Read the original article
Hit count: 167
In one of my aspx pages i have something like this in the head:
<script type="text/javascript">
$(function() {
// Jquery stuff
loadStuff();
});
function loadStuff() {
$('#result1').load({ source: url });
$('#result2').load({ source: url });
$('#result3').load({ source: url });
};
</script>
The idea being that as the page is being displayed these loads will populate the specified divs with results from different webservices as and when the info becomes available.
My problem is that this requests are being queued and being sent one at a time. However I want these to be sent at the same time and whichever returns first gets displayed first!
Also if I try to kick off another request while these divs are loading the request seems to get queued after the others.
How do I make these requests concurrent instead of queued?
Thanks
© Stack Overflow or respective owner