title: Reset button in DataTables Server Side mode to show the original table data
body: <p>I have DataTables 1.10.15 set up in Server Side mode. </p>
  
  <p>The ajax script to produce the data for the table is triggered when various inputs are completed by using jquery's <code>keyup</code> and <code>change</code> methods.</p>
  
  <p>I want to implement a button to reset the table to it's original (first time the page is loaded, before any search/sorting) state.</p>
  
  <p>So I implemented this which means when a button (<code>#resetSearch</code>) is clicked it clears all the search input fields and then redraws the table:</p>
  
  <pre><code>$('#resetSearch').click(function(){
      $(':input','#primarySearch')
      .not(':button, :submit, :reset, :hidden')
      .val('')
      .removeAttr('checked')
      .removeAttr('selected');
  
      myTable.draw();
  });
  </code></pre>
  
  <p>The variable <code>myTable</code> is a reference to DataTables:</p>
  
  <pre><code>var myTable = $('#myTable').DataTable({ });
  </code></pre>
  
  <p>The problem is that although it clears all my search inputs, it doesn't reset the <code>sort</code> and <code>order</code> inputs which are within the table. Therefore if I did a sort descending on column 2, and then pressed <code>#resetSearch</code>, it will give all the results in descending order by column 2 - because there's no code there to reset that to ascending column 0.</p>
  
  <p>I don't understand how to target the <code>sort</code> or <code>order</code> inputs such that I could overwrite them and make this work.</p>
  
  <p>Please can someone help?</p>