Paging with jQuery
Posted
by zurna
on Stack Overflow
See other posts from Stack Overflow
or by zurna
Published on 2010-03-11T15:14:49Z
Indexed on
2010/03/11
17:44 UTC
Read the original article
Hit count: 180
jQuery
|asp-classic
I get data from another page using jQuery get method. But I have a small problem. Sometimes, data that I take from another page is too long so it's divided into pages. When the user clicks on 1, 2, 3, ... links he/she is redirected to the other page. However, I want data to be reloaded on the same page.
Edit
$('ul.thumbs li.pagination a').live('click', function() {
var pageNumber = parseInt($(this).text().replace(/[^0-9]/g, ''));
$.ajax({
type: "GET",
url: "images.cs.asp?Process=ViewImages&PAGEID=<%=Request.QueryString("PAGEID")%>",
success: function(data) {
$("#ViewImages").html(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
$("#ViewImages").html('.');
}
});
return false;
});
© Stack Overflow or respective owner