I received this message while running some javascript programs, and after some Google searches, I have no idea what this means or how I am causing this error. I am including the code below, can someone explain this to me or point me to a resource on how to fix it or what happens in general? The strange thing is that I have different code, like this part in my program, and it never gives me errors about them, so I really got confused. In addition, I get this error only when firebug starts, otherwise wise it just does not work and the error message is not displayed. I also tried it in Chrome and had the same problems, no error messages, but the code does not work.
foundTextFn = function(){
console.log('fire');
if (foundTextArrayPosition != foundTextArray.length){
writeText(foundTextArray[foundTextArrayPosition],"happy");
foundTextArrayPosition += 1;
}
foundTextFnTimer=setTimeout("foundTextFn()",4000);
}
Here is another one of my methods, it's basically the same thing, but it works great. And if that matters, all of these variables are global variables declared at the beginning of my file, like var foundTextArrayPosition = 0; eg.
awayFn = function(){
if (awayArrayPosition != awayArray.length){
if (changeAwayState){
changeAwayState = false;
writeText(awayArray[awayArrayPosition],"normal");
awayArrayPosition ++;
temp = pickRandomSpot();
randomX = temp[0];
randomY = temp[1];
}
else{
changeAwayState = true;
}
awayTimer=setTimeout("awayFn()",10000);
}
else{
abandoned = true;
whyGoneArrayPosition = 0;
whyGoneFn();
}
}
source
share