In a script as shown below, will load functions be called asynchronously or one after the other?
load
<script language="javascript" type="text/javascript"> $(document).ready(function () { $("#TheLink").click(){ $("#PlaceToUpdate1").load("/Controller/Method/View1"); $("#PlaceToUpdat2").load("/Controller/Method/View2"); } }); }); </script>
Asynchronously, by default. If you need them to be disposable, you can do several things:
$.ajax({async:false})
The cleanest way is probably option 2.
Yes, full call to download:
load( url, [data], [callback] )
the third optional parameter is the callback method, which will be called when the asynchronous loading method is completed.