title: DataTables remove row button
body: <p>I am trying to have my script delete the row completely once the "locatebutton" has been pressed. I have the following code however I cannot seem to get it working right. Yes, the table name within DataTables is named "dataTables-example".</p>
  
  <p>Button:</p>
  
  <pre><code>&lt;td&gt;&lt;button type="button" name="locateButton1" class="btn btn-info" onClick="UpdateLocate(&lt;?php echo $orow['wo']; ?&gt;);"/&gt;Locates&lt;/button&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>&lt;script&gt;
  function UpdateLocate(wo)
      {
              jQuery.ajax({
              type: "POST",
              url: "functions/markLocates.php",
              data: 'wo='+wo,
              cache: false,
              success: function(response)
          {
                  //alert("Record successfully updated");
  
                      $('#dataTables-example').on( 'click', 'a.editor_remove', function (e) {
      e.preventDefault();
  
      editor
          .title( 'Edit record' )
          .message( "Are you sure you wish to delete this row?" )
          .buttons( { "button": "locateButton1", "fn": function () { editor.submit() } } )
          .remove( $(this).closest('tr') );
  } );
          }
                      });
      }
  </code></pre>
  
  <p></p>