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
|
// Appel AJAX pour récupérer la valeur du pourcentage d'evolution du traitement
function copy() {
$.ajax({
type: "POST",
url: "/WebService.asmx/GetPourcentage",
timeout:2000,
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(response){
//$("span[id$='lblPourcent']").html(response.d);
$("span[id$='lblEvolutionMessage']").text(response.d)
// poll timer for another trip
setTimeout("copy()", delay)
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//alert('Status : ' + textStatus);
//alert('XMLHttpRequest.status :'+XMLHttpRequest.status);
if(textStatus=='timeout')
{
setTimeout("copy()", delay)
}
}
})
} |
Partager