I've been busy with some AJAX code. I want to calculate how much data has been loaded and I want to display it with percents.
All my preloaded info is inside "feedback". Can I calculate how much DATA it contains (in bytes) and can I also view the progress? Like when it has loaded: 10kb, 20kb, 30kb etc
My code:
function calc(page)
{
$('#pageLoad h2').animate({ marginTop : '0px'}, 200);
$.ajax(
{
url: './pages/page.php',
type: 'POST',
data: 'page='+page,
success: function( feedback )
{
$('#content').html( feedback );
}
});
};
Sorry for my poor english.
See Question&Answers more detail:os