Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!