Question: I have ajax functionality which run tow request same time. I want run these function not same time, After first success run second ajax request

```
jQuery.ajax({
    type:'Post',
    data : {'first':first},
    url : 'abc.php',
    success : function (returnHtml) {
        jQuery(".xyz").html(returnHtml);
    }

});

jQuery.ajax({
    type:'Post',
    data : {'first':first},
    url : 'abc1.php',
    success : function (returnHtml) {
        jQuery(".xyz2").html(returnHtml);
    }

});

```

How can do this

Answer: 
Put the two of these in function. Say Function A and Function B. In the `success :` part of function A, call function B.
You can put second AJAX call inside the `success` callback of first AJAX call:

```
jQuery.ajax({
    type: 'Post',
    data: {
        'first': first
    },
    url: 'abc.php',
    success: function (returnHtml) {
        jQuery(".xyz").html(returnHtml);
        jQuery.ajax({
            type: 'Post',
            data: {
                'first': first
            },
            url: 'abc1.php',
            success: function (returnHtml) {
                jQuery(".xyz2").html(returnHtml);
            }
        });
    }
});

```