Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Problem behind the wheel #51

@jescobedoD

Description

@jescobedoD

Implemte the paginated adding in the method paged an ajax call to the server to bring new data. The pager works fine when I go forward but when it goes back this one restarts and stays with the default values.

Image when I arm the pager
image

Image when the pager restarts
image

$('.pagination').jqPagination({
link_string: '/?page={page_number}',
max_page: _maxPage,
page_string: 'Página {current_page} de {max_page}',
paged: function(page) {
$("#currpage").val(parseInt(page));
/// ajax function
$.ajax({
type: "GET",
url: "/filtroajax",
data: $('#_form').serialize(),
success: function(json) {
var obj = jQuery.parseJSON(json);
var count = jQuery.parseJSON(obj.count);
var CantidadRegistros = parseInt(count[0].registros);
var ixp = parseInt($("#ixp").val());
$("#tbl_result > tbody ").empty();
$.each(jQuery.parseJSON(obj.source), function(i, item) {
var row = '' +
'' + item.id_equipment + ' ' +
'';
$("#tbl_result > tbody ").append(row);
});
},
error: function() {
window.alert('ERORR Peticion');
}
});
///****** Fin ajax Paginacion *****/
}
});

regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions