Mehul Koshti Mehul Koshti - 4 months ago 12
jQuery Question

how to Loading php file one by one?

$('#demo').html('<img src="/parcel-pricer/img/ajax-loader.gif" style="margin-left:50px;width:20%;margin-bottom:10px;">');
$('#demo').show();
$('#demo').load('fast.php?send='+send+'&delv='+delv+'&quant='+quant+'&weight='+weight+'&length='+length+'&width='+width+'&height='+height+'&send1='+send1+'&delv1='+delv1+'&value='+value+'&country_send='+country_send+'&country_delv='+country_delv);
$('#demo1').html('<img src="/parcel-pricer/img/ajax-loader.gif" style="margin-left:50px;width:20%;margin-bottom:10px;">');
$('#demo1').show();
$('#demo1').load('Timed.php?send='+send+'&delv='+delv+'&quant='+quant+'&weight='+weight+'&length='+length+'&width='+width+'&height='+height+'&send1='+send1+'&delv1='+delv1+'&value='+value+'&country_send='+country_send+'&country_delv='+country_delv);


i am load multiple php file using .load() function. all file are load for some time but php file not load for one time his load for by one by one.. so plz how is ???

Answer

Try using the callbacks like:

//load to first target div
$( "#target_1" ).load( "url_1", function() {
    //load to second target div
    $( "#target_2" ).load( "url_2", function() {
         ... and so on if any
    });
});
Comments