Hola a todos, soy un novato en datatable y recientemente trabajé con él, pero tengo algunos problemas con él.
He inicializado una tabla de datos de la siguiente manera:
<table class="table" id="complaint-table"> <thead> <tr> <th>Job Card No.</th> <th class="text-center">Status</th> <th class="text-center">Opened On</th> <th>Closed On</th> <th>Vehicle No.</th> <th>Complaint Type</th> <th>Workshop Name</th> <th>Estimated Time</th> <th>Time Taken</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach($complaints as $value) { ?> <tr> <td><span class="job-card-no">2344</span></td> <td class="text-center"><span class="status-chip status-purple">Open</span></td> <td class="text-center">22/1/2023</td> <td>-</td> <td>GJ 06 VM 4567</td> <td>Complaint</td> <td>Workshop Name 1</td> <td>2:00 PM</td> <td>-</td> <td> <span><a href="#" class="btn table-btn table-blue-border-btn">Edit</a></span> <span><a href="#" class="btn table-btn table-blue-btn">View</a></span> </td> </tr> <?php } ?> </tbody> </table> <script> $(document).ready(function() { $.noConflict(); var table = $('#complaint-table').DataTable( { 'paging': true, "pageLength": 5 }); }); </script>Datatable funciona perfectamente, pero al hacer clic en el enlace de la página, se redirige a una URL como esta: http://localhost/aofs/undefined. muestra una página indefinida. por favor alguien tiene alguna idea sobre este tema?