Good day
I am working on a script which paginates an sql resultset and provides an XLS download. I want the users to be able to page through the results while their file is being built. I have this working, except it doesn't actually process the "page changes" until after the file is finished building, which defeats the purpose.
Does anyone here know how to make the xls file build allow the other faster results to execute? Basically I want it to happen in the background, but it is forcing everything else to wait.
Here's the javascript calls that I am currently using:
I have been crawling through documentation and forums looking for an answer to this for a while now, any insights would be greatly appreciated.
I am working on a script which paginates an sql resultset and provides an XLS download. I want the users to be able to page through the results while their file is being built. I have this working, except it doesn't actually process the "page changes" until after the file is finished building, which defeats the purpose.
Does anyone here know how to make the xls file build allow the other faster results to execute? Basically I want it to happen in the background, but it is forcing everything else to wait.
Here's the javascript calls that I am currently using:
Code:
function loadContent (offsett) {
$('#content').load('mmiteminqcltic.php', {offset: offsett, x: (new Date()).getTime()});
}
function mkDlFile () {
$('#download').load('mmiteminqcltdl.php', {x: (new Date()).getTime()});
}
$(document).ready(function(){
loadContent ();
$(".goFirst").live("click", function(){
offset = 0;
loadContent (offset);
});
$('.goPrev').live("click", function(){
offset = offset - 15;
loadContent (offset);
});
$('.goNext').live("click", function(){
offset = offset + 15;
loadContent (offset);
});
$('.goLast').live("click", function(){
offset = offset + 15;
loadContent (offset);
});
$('#loading').hide() // hide it initially
.ajaxStart(function() {
$(this).show();
})
.ajaxStop(function() {
$(this).hide();
});
$("#content").ajaxStop(function () {
});
mkDlFile ();
});
I have been crawling through documentation and forums looking for an answer to this for a while now, any insights would be greatly appreciated.