Dear friends,
I have a big problem, I created a page that loads more values (load more) where I inform values via Jquery and retrieve it in another ASP page through request example:
page_number = Request("page")
See the Jquery code:
$(document).ready(function() {
$("#load_more_button").hide();
$("#load_more_button").delay(2000).fadeIn('fast');
var track_click = 0; //track user click on "load more" button, righ now it is 0 click
var register_per_page = 8;
var total_pages = 3,625;
$('#results').load("links_mais.asp", {'page':track_click, 'reg_per_page':register_per_page}, function() {track_click++;}); //initial data to load
$(".load_more").click(function (e) { //user clicks on button
$(this).hide(); //hide load more button on click
$('.animation_image').show(); //show loading image
if(track_click <= total_pages) //user click number is still less than total pages
{
//post page number and load returned data into result element
$.post('links_mais.asp',{'page': track_click, 'reg_per_page':register_per_page}, function(data) {
$(".load_more").show(); //bring back load more button
$("#results").append(data); //append data received from server
//scroll page smoothly to button id
$("html, body").animate({scrollTop: $("#ate_aqui").offset().top}, 500);
//hide loading image
$('.animation_image').hide(); //hide loading image once data is received
track_click++; //user click increment on load button
}).fail(function(xhr, ajaxOptions, thrownError) { //any errors?
alert(thrownError); //alert with HTTP error
$(".load_more").show(); //bring back load more button
$('.animation_image').hide(); //hide loading image once data is received
});
if(track_click >= total_pages-1) //compare user click with page number
{
//reached end of the page yet? disable load button
$(".load_more").attr("disabled", "disabled");
}
}
});
});
Notice the lines:
var register_per_page = 8;
var total_pages = 3,625;
These values are passed to the file: links_mais.asp.
In my offline server running normal, but not online.
Why does this happen? Does anyone know?
Thanks for your attention.