dojoを使用して2つのxhr.getsを次々に実行するにはどうすればよいですか?
私は持っています ....
require(["dojo/_base/xhr", "dojo/dom", "dojo/domReady!"],
function(xhr, dom) {
// Using xhr.get, as very little information is being sent
xhr.get({
// The URL of the request
url: "inc/etl2json.php?item=Execs",
// The success callback with result from server
load: function(execContent) {
dom.byId("Execs").innerHTML = execContent;
},
// The error handler
error: function() {
// Do nothing -- keep old content there
}
});
});
別のxhr.getを"inc/ etl2json.php?item = Execs"に実行し、それをdom.byId( "Elapsed")。innerHTML=lapsedContent;に割り当てたいと思います。