here is how i would try it, simply using the load() function built-in
callback parameter

$("#div1").load( "scripts/generateA.php", {VAR: var} ,function(){
$("#div2").load( "scripts/generateB.php", {VAR: var},
function(){
$("#div3").load( "scripts/generateC.php", {VAR: var}, function(){
$("#div4").load( "scripts/generateD.php", {VAR: var} );
} );
}
 );
});



On Mon, May 19, 2008 at 10:39 PM, FreeKill <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm thinking there is something I'm just overlooking, but I hope
> someone can help...
>
> I have a set of load calls that are each made at document load:
>
> $("#div1").load( "scripts/generateA.php", {VAR: var} );
> $("#div2").load( "scripts/generateB.php", {VAR: var} );
> $("#div3").load( "scripts/generateC.php", {VAR: var} );
> $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
> What I want to do is make a 5th load call, but only once the previous
> 4 are completed. Is there a way to wrap a block of calls in a way that
> a Callback function is called when they call complete?
>
> I can think of some other, less optimal ways of getting this
> accomplished, but I'm hoping someone might know how to do it the way
> I've got it going now.
>
> Any suggestions? Your help is appreciated...
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com

Reply via email to