Hmm just realized I need the two ajax calls but the second one needs to be recursive. I don't think the poll function call will run more than once?
The Status function call will have the recursive call every 3/4 second. Doesn't look like that will happen in parallel correct?
Code:var done = 2; //number of total requests (methods?) var sum = 0; $(["Update", "Status"]).each(function () { var method = this; $.getJSON("/Setting/" + method, function (data) { sum += data.value; done -= 1; if (done == 0) $("#mynode").html(sum); }); });





Reply With Quote