ajax多个请求

i am sending multiple ajax requests at a same time as ajax sends Asynchronous request but i want to execute second request until i get my first response. as first response may dependent on second one and so on .

here is my code

$.ajax({
        'url':'<?php echo $html->url(array('controller'=>'users','action'=>'priceofitem'));?>/'+menu_item_id,
        'type':'POST',
            success:function(result) {
                var price= valu*parseFloat(result);
                $('.total-price').html(price);
            }   
        }); 

Anybody have any idea??

You need to send syncronious request, and specify async :false

success:function(result) 
{                 
var price= valu*parseFloat(result);                 
$('.total-price').html(price);
},
async:   false

set async:false e.g.

$.ajax({
        url:'<?php echo $html->url(array('controller'=>'users','action'=>'priceofitem'));?>/'+menu_item_id,
        type:'POST',
        async:false,
            success:function(result) {
                var price= valu*parseFloat(result);
                $('.total-price').html(price);
            }   
        });