title: How to wait for response in $.post jQuery
body: <p>PHP returns value  with 1-2 second delay jQuery.post doesn't wait for response. </p>
  
  <p>How do you think, is it possible to fix that problem and wait for response?</p>
  
  <pre><code>    $.post( sSource, aoData, function (data) {    
          oCache.lastJson = jQuery.extend(true, {}, data);
          if ( oCache.iCacheLower != oCache.iDisplayStart )
          {
              data.aaData.splice( 0, oCache.iDisplayStart-oCache.iCacheLower );
          }
          data.aaData.splice( oCache.iDisplayLength, data.aaData.length );
           abc(oCache);
          fnCallback(data); 
      },"json" );
  </code></pre>
  
  <p><em>Note</em> the same function with get works well</p>
  
  <pre><code>    $.getJSON( sSource, aoData, function (json) { 
          /* Callback processing */
          oCache.lastJson = jQuery.extend(true, {}, json);
  
          if ( oCache.iCacheLower != oCache.iDisplayStart )
          {
              json.aaData.splice( 0, oCache.iDisplayStart-oCache.iCacheLower );
          }
          json.aaData.splice( oCache.iDisplayLength, json.aaData.length );
  
          fnCallback(json)
      } );
  </code></pre>