http://jsfiddle.net/mplungjan/SyHFR/
Sorry for the messy code - I changed a script that I didn’t select and originally from Dynamic Drive - it is used by someone I help and, rather, rewriting it all from scratch, I agreed to a creep function.The supposed changes were to add repeat after and delay with vars
Now I just want to understand where the problem may be - I changed the code to use the date object every second, so that it could be used only during initialization.
Code
cdtime.prototype.updateTime=function(){ var thisobj=this; this.currentTime+=1000;
gives
Message: 'thisobj' is null or not an object
after about 9 hours in IE8 on XP
I run it myself now in a different box over the weekend, but wondered if anyone could enlighten me about what could be a problem with IE.
HMM - inserting a function right now, I see that the setting is inside the prototype - it suddenly looks wrong.
Please also feel free to tell me the best counter that can do what this one does, for example. start after a delay, repeat after a specified time and have more than one counter on the page created by CSS.
UPDATE
Trying setInterval makes all coundown very mutable http://jsfiddle.net/mplungjan/z2AQF/
source share