I am trying to take data to one page from another. The problem is here is, data may be too long and divided into multiple pages. When the user clicks on 1, 2, 3, ... links he is redirected to the other page. However, I want data to be reloaded on the same page. With SLaks's suggestions I came up with the following code but it is not working at the moment.
$('ul.thumbs li.pagination a').live('click', function() { var pageNumber = parseInt($(this).text().replace(/[^0-9]/g, ''));
$(function ViewImages() {
$.ajax({
type: "GET",
url: "images.cs.asp?Process=ViewImages&PAGEID=" + pageNumber,
success: function(data) {
$("#ViewImages").html(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
$("#ViewImages").html('.');
}
});
});
return false;
});