title: success and failure criteria for ajax(jquery post) purposes
body: <p>I have been looking around the web (obviously in wrong places) to find what is the success and failure criteria for ajax(jquery post) purposes.</p>
  
  <p>For example, let's say I am using ajax to post to a php script. The script can return:</p>
  
  <ul>
  <li>exit 0</li>
  <li>exit 1</li>
  <li>jason array</li>
  <li>return</li>
  <li>etc...</li>
  </ul>
  
  <p>When would those return values be translated into success and when into failure? </p>
  
  <p>As you may already know $.ajax() supports beforeSend, success, error and complete callbacks. </p>
  
  <p>So what should my script send in case of success and in case of failure for the appropriate callback to be triggered.</p>