I have a problem of finding when all the ajax completed.Here is my function.
function getValuesForTablePropertySelected(questionList, itemsArray) {
    for (var i = 0; i < itemsArray.length; i++) {
        switch (itemsArray[i]) {
        case "Tags":
                loadTag(questionList);
                break;
        case "Date Created":
                displayTablePropertySelected(itemsArray);
                break;
        case "Date Last Used":
                loadDLU(questionList);
                break;
        case "Number of Launched Surveys Used In":
                loadNLSU(questionList);
                break;
        case "Number of Reponses":
                loadNR(questionList);
                break;
        case "Type 1 Associations":
                loadT1A(questionList);
                break;
        case "Type 3 Associations":
                loadT3A(questionList);
                break;
        case "Sites Linked To":
                loadSLT(questionList);
                break;
        case "Last Modified By":
                displayTablePropertySelected(itemsArray)
                break;
        default:
                break;
        }
    }
    showResult();
}
Each function in the "CASE" contains an ajax call. I need to use asynchronous calls only.
I want to trigger "showResult()" function after AJAX complete in all the functions . Different AJAX is taking different time to complete.
Please help me find a solution for this situation.
 
     
    