Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

117
Vistas
Datatable is initializing with pagination but while clicking on page link it redirects to undefined page

Hello everyone I am newbie to datatable and recently working with it, but I am facing some issues with it.

I have initialized a datatable as below:

<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 is working perfectly but while clicking on page link it redirects to URL like this: http://localhost/aofs/undefined. its shows an undefined page. please anyone have any idea about this issue?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda