I call two functions in my js which get data via ajax:
getNumContentTotal(ctx);
getContentAll(ctx);
getNumContentTotal(ctx) sets a var that is required by getContentAll(ctx);
Is there a way of not executing the second function until my var is set?