javascript - Calling different setInterval() for polling multiple functions (How to handle multiple setInterval calls) -
i developing application in have continously poll 5 different functions using setinterval()
the problem of times function call gets aborted , there issue sequence of execution. meant.
interval=setinterval("function1()",1997);//997 interval=setinterval("function2()",2697); //1947, 1497 interval=setinterval("function3()",2837); //1977 interval=setinterval("function4()",2851); //2177 interval=setinterval("function5()",2873); //3051
most of times of function call getting aborted , affects mode of execution. tried changing time interval there still no use. there solution this???
please help...
thanks in advance
this screenshot of console... mite understand situation better
you should use different variables different intervals
like,
interval1 = setinterval("function1()",1997);//997 interval2 = setinterval("function2()",2697); //1947, 1497 interval3 = setinterval("function3()",2837); //1977 interval4 = setinterval("function4()",2851); //2177 interval5 = setinterval("function5()",2873); //3051
Comments
Post a Comment