var _progress = {
url: "Handlers/ProgressHandler.ashx",
data: { guid: _guid[i] },
dataType: "xml",
type: "post",
beforeSend: function () { },
success: function (response) {
var filsSize = $(response).find("root fileSize").text();
var finished = $(response).find("root fileFinished").text();
if (parseInt(finished) >= parseInt(filsSize)) {
window.clearInterval(_timer);
}
document.getElementById("progressLine").style.width = eval(finished / filsSize * 100) + "%";
document.getElementById("progressLine").innerHTML = finished + "";
},
error: function () { }
};
}
_timer = window.setInterval(function () { $.ajax(_progress); }, 500);
url: "Handlers/ProgressHandler.ashx",
data: { guid: _guid[i] },
dataType: "xml",
type: "post",
beforeSend: function () { },
success: function (response) {
var filsSize = $(response).find("root fileSize").text();
var finished = $(response).find("root fileFinished").text();
if (parseInt(finished) >= parseInt(filsSize)) {
window.clearInterval(_timer);
}
document.getElementById("progressLine").style.width = eval(finished / filsSize * 100) + "%";
document.getElementById("progressLine").innerHTML = finished + "";
},
error: function () { }
};
}
_timer = window.setInterval(function () { $.ajax(_progress); }, 500);