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

104
Visualizações
Next page of paginationType input of Datatable upon submit does not display the searched in first page

I'd tried using the paginationType plugin for Datatable to be enable to use jump to page function I used the input paginationType plugin.

I have implemented the input plugin but I found an error when submitting the form

For example I have 2 pages in the datatable I put the page 2 in the input field of the paginationType

enter image description here

and then in my form I searched for a username where was displayed on page 1. Upon submit, it doesn't display any result. But when I try to searched while in page 1 on that username it displays the result.

What I tried to do is this

 $('body').on('submit','#search-form', function(){

 if ( ! $.fn.DataTable.isDataTable('#userstable') ) {
        $('#userstable tbody').empty();
   }else{
       $('#userstable tbody').empty();
       $('#userstable').DataTable().clear();
       $('#userstable').DataTable().destroy();
   }

   $('#userstable').DataTable();
});

I tried to destroy the table then reinitialize it but upon doing this it still displays no result and the floatingScroll for the datatable is broken.

Here is the link to the plugin I used

https://datatables.net/plug-ins/pagination/input

Thank you in advance.

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