title: Calling a function and not moving on until complete?
body: <p>I call two functions in my js which get data via ajax:</p>
  
  <pre><code>getNumContentTotal(ctx);
  getContentAll(ctx);
  </code></pre>
  
  <p>getNumContentTotal(ctx) sets a var that is required by getContentAll(ctx);</p>
  
  <p>Is there a way of not executing the second function until my var is set?</p>