When i delete the row from datatable, the data rows are not refresh (still exist the deleted one).
but the row had been deleted in mysql database.
first of all this is my jscript import
This is what i initialized.
Pls, help me...
but the row had been deleted in mysql database.
first of all this is my jscript import
<script src="media/js/jquery-1.4.4.min.js" type="text/javascript"></script> <script src="media/js/jquery.dataTables.js" type="text/javascript"></script> <script src="media/js/jquery.dataTables.editable.js" type="text/javascript"></script> <script src="media/js/jquery.jeditable.js" type="text/javascript"></script> <script src="media/js/jquery-ui.js" type="text/javascript"></script> <script src="media/js/jquery.validate.js" type="text/javascript"></script> <script src="media/js/KeyTable.js" type="text/javascript"></script> <script src="media/jAlert/jquery.alerts.js" type="text/javascript"></script>
This is what i initialized.
<script type="text/javascript"> $(document).ready(function(){ var oTable = $('#editable').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers", }).makeEditable({ sDeleteURL: "CRUD/DepDelete.php", fnOnDeleted: function() { oTable.fnDraw(false) }, oDeleteRowButtonOptions:{ label: "Remove", }, fnShowError: function (message, action){ switch (action) { case "delete": jAlert(message, "Delete"); break; } }, }); }); </script>This is how my table looks alike
<table cellpadding="0" cellspacing="0" border="0" class="display" id="editable"> <thead> <tr><button id="btnDeleteRow">Delete</button></tr> <tr> <th>DeptName</th> <th>CDate</th> </tr> </thead> <tfoot> <tr> <th>DeptName</th> <th>CDate</th> </tr> </tfoot> <tbody> <?php while ($row = mysql_fetch_assoc($alldeptresult)) { ?> <tr id="<?php echo $row['idxDept']; ?>"> <td id="<?php echo $row['DeptName']; ?>"><?php echo $row['DeptName']; ?></td> <td id="<?php echo $row['CDate']; ?>"><?php echo $row['CDate']; ?></td> </tr> <?php } ?> </tbody></table>
Pls, help me...