title: jQuery, DataTables, ajax error handling: get rid of "Processing" message
body: <p>I am using jQuery DataTables, ajax and Bootstrap in a small project.  It is mostly working and I am testing error states.  I have setup my html for the DataTables table.  There is a <code>table-responsive</code> div surrounding the <code>&lt;table&gt;</code>.</p>
  
  <pre><code>&lt;div id="errorDiv"&gt;&lt;/div&gt;
      &lt;div id="resultTableDiv" class="table-responsive"&gt;
          &lt;table id="resultTable"  class="table table-striped table-bordered table-hover table-condensed" cellspacing="0"&gt;
              &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;...&lt;/th&gt;
                  ...
              &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tfoot&gt;
              &lt;tr&gt;
                  &lt;th&gt;...&lt;/th&gt;
                  ...
              &lt;/tr&gt;
              &lt;/tfoot&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the DataTables init I setup the ajax call and specify an <code>error</code> callback function.  This "works" in that I can force an error in the server side ajax code and the callback is fired.  I can handle the returned error as I want.</p>
  
  <p>My issue is that when the ajax call starts the table body is "replaced" by a <code>Processing</code> message. That's fine except that when ajax reports the error via the callback the processing message is still there and I have yet to figure out how to make it go away via the DataTables methods or API calls.</p>
  
  <p>my error callback looks like</p>
  
  <pre><code>function ajaxError(jqXHR, textStatus, errorThrown) {
      var obj = jQuery.parseJSON(jqXHR.responseText);
      if (obj &amp;&amp; obj.Error) {
          $('#errorDiv').html("&lt;p&gt;" + obj.Error + "&lt;/p&gt;");
      }
  }
  </code></pre>
  
  <p>I have a "global" variable that holds the DataTables table definition.  It is set in the jQuery ready function</p>
  
  <pre><code>var table;
  $(function () {
      $('#errorDiv').empty();
      $('#resultTable').show();
  
      table = $('#resultTable').DataTable({
          paging: false,
          processing: true,
          autoWidth: false,
          ordering: false,
          ajax: {
              url: "ions.cgi",
              dataType: 'json',
              dataSrc: "LIST",
              error: ajaxError
          }, ...
  </code></pre>
  
  <p>In the error callback I have tried all of the following:</p>
  
  <pre><code>table.clear().draw();    // does nothing
  table.fnRedraw();        // says that function does not exist
  </code></pre>
  
  <p>In this error state how should the <code>Processing</code> message be reset?</p>