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

252
Views
How to get all datas in one table that divided into pages?

I'm developing web using PHP and CI Framework. I have problem in getting data from table view in web. So, I have table that has 16 entries, the table show 10 entries in the first page and 6 entries in the second page. Then I have on change function after edit field value in the table, here is my code.

function hitungTotalAmount(total)
{
    alert(total);
    var total_amount = 0;
    var amounts = document.getElementsByName('amount[]');
    var oke = amounts.length;
    alert(oke);

    for (var i = 0; i < amounts.length; i++)
    {
        var h = amounts[i].value;
        const values = h.replace(/,/g, '');
        var h = parseFloat(values);

        total_amount = total_amount + h;
    }

    let tot = parseFloat(total_amount).toLocaleString('en-US', {
        style: 'decimal',
        maximumFractionDigits: 2,
        minimumFractionDigits: 2
    });

    $("#total_amount").val(tot);
    $("#invoiceamountdpp").val(tot);
    $("#span-total_amount").text(tot);
}

In this code, I only get my active element which in my current open page. If I open in the first page that has 10 entries, the amount.length value is 10. I need to get all datas in all pages. I want to get 16. How could I do that? Thank you so much for your help.

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!