title: access the return value from boolean ajax call
body: <p>I have an ajax call that returns a boolean. The method on the server works fine. How can I access the return data from this function and use it?</p>
  
  <pre><code>var hasCondition = function () {                    
      $.ajax({
          url: "mhqpreinterview.aspx/hasconditions",
          type: "POST",
          contentType: "application/json; charset=utf-8",
          datatype: "json",
          data: JSON.stringify({ questionNumber: ClickedQuestion }),
          success: function (data) {
  
          }
      });
  }
  
  if (hasCondition()) {
  //stuff
  }
  </code></pre>