1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
var intervalID;
...
intervalID=setInterval(updateProgress, 250);
....
function updateProgress() {
$.ajax({
type: "POST",
url: "page.aspx/GetPourcentage",
contentType: "application/json; charset=utf-8",
success: function(msg) {
$("#pourcentValue").html(100);
clearInterval(intervalID);
},
error:function(xhr,err){
alert("readyState: "+xhr.readyState+"\nstatus: "+xhr.status);
alert("responseText: "+xhr.responseText);
}
});
var val= $("input[id$='hdfPourcentage']").val();
var value = $("#progressbar").progressbar("option", "value");
if (value < 100) {
// au lieu du 1 mettre val , mais hidden field toujorus à 0 ????!!!!!
$("#progressbar").progressbar("value", value + 1);
$("#pourcentValue").html($("#progressbar").progressbar("option", "value")) ;
}
} |
Partager