Menu

#7 progress message

open
nobody
None
5
2006-05-19
2006-05-19
Bruno Braga
No

Because do not it exhibit in the message, the quantity
of kb were loaded, or the loaded percentage?
In my tests, I obtained to exhibit how many Kb were loaded.
A similar function can come ready in the aa.js.

change callback:
-----------------------------------------------
AjaxAnywhere.prototype.callback = function() {
this.progressMessage();
if (this.req.readyState == 4) {
....
-----------------------------------------------

add function progressMessage:
-----------------------------------------------
AjaxAnywhere.prototype.progressMessage = function() {
div = document.getElementById("AA_" + this.id +
"_loading_div");
if (this.req.readyState == 3){ // if we are still
loading the file
carregados = this.req.responseText.length; // size
of data allready loaded
div.innerHTML = " loading...
"+Math.floor(carregados/1024)+"kb";

} else if (this.req.readyState == 2) {
div.innerHTML = " process...";
}
}
-----------------------------------------------

Discussion


Log in to post a comment.

MongoDB Logo MongoDB