In my JS I want to wait for this fnDocumentTypeCount
to be compelted before I go into the other with the logic for the init but it will not wait for that function to be completed.fnDocumentTypeCount is a $.ajax
that I was going to return a number.
init: function () {
var countType = fnDocumentTypeCount(GroupId);
console.log(countType);
}