1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| function attenteCorbeille() {
dojo.xhrGet( {
// The following URL must match that used to test the server.
url: "<%=request.getContextPath()%>/template/getCorbeilleValue.do",
handleAs: "text",
timeout: 1000,
// The LOAD function will be called on a successful response.
load: function(response, ioArgs) {
dojo.byId("zone").innerHTML = response;
return response;
},
// The ERROR function will be called in an error case.
error: function(response, ioArgs) {
console.error("HTTP status code: ", ioArgs.xhr.status);
return response;
}
});
setTimeout(function(){attenteCorbeille()}, 5000);
} |
Partager