Ajax response is taking time to populate.
- by Rachel
I am having an util class which is not owned by me. I am calling one of the method of that util class which inturn calls one ajax function. And gives me response back.
I need to make a decision depending on the response object. The problem is that response object takes some time to populate(mili seconds).
var selector = dojo.byId("SelectorId");
var theChart = new chart( selector, 135, 92, style, frequency, time);
if(theChart.data ===null){
console.log("No response");
}else{
Console.log("Use response data");
}
and
chart( selector, 135, 92, style, frequency, time);
is not owned by me. chart() is from util class.
above snippet works fine with break point. But when I remove the breakpoint it starts going in "if" block always.
Hows can I solve this issue.