title: Datatable Ajax.Reload
body: <p>I have a Datatable that loads when the page is first loaded.
  Here is the ajax call.</p>
  
  <pre><code>    $(document).ready(function(){
      $("#queueListSelect").dataTable({
          "ajax": {
          "url": "-,
          "type": "GET",
          "dataType": "json",
          "contentType": "application/json; charset=utf-8",
          "success": function(data){
              var numberOfMessages = 0;
              for(var key in data.queueInformation){
                  numberOfMessages++;
                  $("#queueListSelect tbody").append('&lt;tr id= "row'+numberOfMessages+'"&gt;&lt;td id="queueName'+numberOfMessages+'"&gt;'+data.queueInformation[key].queueName+'&lt;/td&gt;&lt;td&gt;'+data.queueInformation[key].pendingMessageCount+'&lt;/td&gt;&lt;td&gt;'+data.queueInformation[key].pendingMessageSize+'&lt;/td&gt;&lt;td&gt;'+data.queueInformation[key].receiverCount+'&lt;/td&gt;&lt;td&gt;'+data.queueInformation[key].inTotalMessages+'&lt;/td&gt;&lt;td&gt;'+data.queueInformation[key].outTotalMessages+'&lt;/td&gt;&lt;td&gt;'+data.queueInformation[key].receiverCount+'&lt;/td&gt;&lt;/tr&gt;');
              }
              //success function requires a return, this removes the "loading" row that appears in the dataTable
              $("#queueListSelect td.dataTables_empty").remove();
            }
          },
          "paging":   false,
          "scrollY": "390px",
          "scrollX":  true,
          "info":     false
      });
  });
  </code></pre>
  
  <p>After submitting a message, I would like the dataTable to reload using the ajax.reload feature, so as you will see I have another ajax call for submitting the message information.</p>
  
  <pre><code>        var queueTable = $("queueListSelect").DataTable();
  
      if ($("input[name=messageType]:checked").val() == "text"){
          var textBody = $('#textMessageBody').val();
  
          $.ajax ({
              url: "",
              type: "POST",
              dataType: "json",
              contentType: "application/json; charset=utf-8",
              data: JSON.stringify({"queueName": queueName, "textBody": textBody, "jmsDeliveryMode": jmsDeliveryMode, "jmsDestination": jmsDestination, "jmsCorrelationID": jmsCorrelationID, "jmsType": jmsType, "jmsExpiration": jmsExpiration, "jmsPriority": jmsPriority}),
              success: function() {
                  alert("Your message was sent"); 
              },
              complete: function(){
                  $("#messageModalCloseButton").click();
                  queueTable.clear();
                  **queueTable.ajax.reload();**
              }
          });
  </code></pre>
  
  <p>Once this message is sent the modal will close and the table SHOULD be updated from the information sent in the message. There are currently no errors in my debugger and when I put a breakpoint on it, it shows that it runs- which is odd because the table does not contain the new information. Once I refresh the page, the new information appears.</p>
  
  <p>Any ideas why this datatables feature is not working?
  I am using jquery and datatables version 1.10.</p>