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

251
Vistas
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
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