title: Ajax request for server side data for each page in Datatables
body: <p>I am using Jquery Datatables to load an array of array of data (aaData) obtained via ajax call from server side. I don't want to pull whole of the data at once rather I need to make ajax request for loading data every time user clicks "prev" or "next" in Datatables pagination.</p>
  
  <p>How can this be achieved ?I want to make an ajax call and fetch results on the fly for that page only.</p>
  
  <p>Below is the javascript code where in I am making a call.</p>
  
  <pre><code>$.ajax({              
   type: "GET",
   url: "ajaxBacklog",
   contentType: 'application/json',
   data: null,
   dataType: 'json',
   success: function(json){                  
       oTable = $("#backlogTable").dataTable({
           "aaData": json.aaData,
           "bProcessing": true,
           "bServerSide": true,
           "sPaginationType": "full_numbers",
           "bJQueryUI": true,
           "bRetrieve": true,
           "bPaginate": true,
           "bStateSave": true,
           "bSort": true,
           "aaSorting": [[ 4, "desc" ]],
           "iDisplayLength": 25,
           "oLanguage": {
                   "sProcessing": "&lt;img src='resources/images/loader.gif'/&gt;",
                   "sEmptyTable": "No records found."
               },
           "aoColumns": [
               { "sClass": "alignCenter"},
               { "sClass": "left"},
               { "sClass": "left"},
               { "sClass": "left"},
               { "sType": 'date-uk', "sClass":"datecolumn"},
               { "sType": 'date-uk', "sClass":"datecolumn"},
               { "sClass": "left"},
               { "sClass": "left"}
           ],
           "error": function() {
               alert("Failed to load Data");
           }
       });
      }
     }
  );
  </code></pre>
  
  <p>I have also followed the <a href="http://www.datatables.net/release-datatables/examples/server_side/server_side.html" rel="nofollow">server side processing</a> of datatables as well but nothing is working.</p>