Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda