Summery: I have to get several data from a service(hosted on multiple servers) using C# and finally display them to the user/s, all on one page, using ajax call. Consider that the final display formats contains charts and progresses that have created by Jquery and styled by CSS.
Some Code:
// Once Called Here and Timer Will Go On
UpdateDataA();
function UpdateDataA() {
$.ajax({
type: "POST",
async: true,
url: "Default.aspx/GetData",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
var $s = $(".second");
$s.val(r.d[0]).trigger("change");
updateProgressA(r.d[1]);
updateProgressB(r.d[2]);
updateNetworkData(bytesToSize(r.d[5], 2), bytesToSize(r.d[6], 2));
},
error: function (msg) {
alert(msg.error);
}
});
setTimeout(function () { UpdateDataA(); }, 1000);//Timer
}
Consider more calls like this.
Problem: Timer intervals doesn't update at intervals have set. One element updates correct then waits for others to complete while it shouldn't. But I need to update all continuously together. In this way, if one call crash, Others will be die.
Question: What can I do or What are my faults?
Note: I'm new to jquery and ajax.
Thank You previously