Programatorul
Programmer
Hello people,
I'm trying to build a page that will have parts of it refreshing from time to time through AJAX. The thing is that these parts will have to refresh at different intervals.
So i started building some kind of refreshing system for scalability (will have other parts opened dinamically and some closed, so it would be crazy not to make a refreshing manager). Here's some code. I've placed a test page here: The js is here
Quite dummy I know but it's just the first version (no ajax implemented yet) and it works quite fine except this problem: after a few good calls of the interval function the script delays an interval then calls the function twice. It's like it lags a bit then two calls are made the same time. It works properly a few times, then again it lags. ans so on. Just watch those numbers pop up and you;ll see (i hove, haven't tested it on another system yet). First i thought that my coputer is playing tricks but i restarted and same happened.
I hope I make any sence. If not please tell me and i'll be more eplicit. I'd apreciate if you had a look at my problem, and maybe you spot something. Maybe you hade a similar problem and you can guide me. Thank you all very very much!
I'm trying to build a page that will have parts of it refreshing from time to time through AJAX. The thing is that these parts will have to refresh at different intervals.
So i started building some kind of refreshing system for scalability (will have other parts opened dinamically and some closed, so it would be crazy not to make a refreshing manager). Here's some code. I've placed a test page here: The js is here
Quite dummy I know but it's just the first version (no ajax implemented yet) and it works quite fine except this problem: after a few good calls of the interval function the script delays an interval then calls the function twice. It's like it lags a bit then two calls are made the same time. It works properly a few times, then again it lags. ans so on. Just watch those numbers pop up and you;ll see (i hove, haven't tested it on another system yet). First i thought that my coputer is playing tricks but i restarted and same happened.
I hope I make any sence. If not please tell me and i'll be more eplicit. I'd apreciate if you had a look at my problem, and maybe you spot something. Maybe you hade a similar problem and you can guide me. Thank you all very very much!