title: Datatables - prepopulate search box
body: <p>I want to be able to store a list of common search terms, which a user can click and thus automatically filter a datatable.</p>
  
  <pre><code>$('#table').on('preXhr.dt', function() {
      alert('test');//$search
  })
  </code></pre>
  
  <p>On <a href="http://datatables.net/reference/event/preXhr" rel="nofollow">http://datatables.net/reference/event/preXhr</a> I saw this event handler could be used to do something before an AJAX call is made (which is perfect - as I could intercept the script at this point, add my prepopulated search term.</p>
  
  <p>But I find that the first time the datatable loads, this event doesn't fire.</p>
  
  <p>Any time I sort, etc it fires before the AJAX call.</p>
  
  <p>But I really need to be able to access the search box in Datatables <em>before</em> the initial dataset is loaded.</p>
  
  <p>How can I do this?</p>