Reputation: 10801
I get the following error message in IE 8 & 7, with the following code, specifically when I call the function:
setDayDelay();
What could be wrong here?
function setDayDelay() {
if (twoDigitDate == 1) {
day = ("day1");
startbuttondelay = 1600;
} else if (twoDigitDate == 7) {
day = ("day7");
startbuttondelay = 9400;
} else if (twoDigitDate == 8) {
day = ("day8");
startbuttondelay = 10300;
} else if (twoDigitDate == 9) {
day = ("day9");
startbuttondelay = 11000;
} else {
day = ("inactive");
startbuttondelay = 1000;
}
console.log("The day variable is: " + day);
console.log("The startbutton delay is: " + startbuttondelay);
}
setDayDelay();
Upvotes: 0
Views: 265
Reputation: 9612
twoDigitDate
variable somewhere before using it.Try this out, this works on IE7 and IE8.
Upvotes: 1
Reputation: 36
Is twoDigitDate a global variable or undefined in your code ? What does the "error message" say ?
Upvotes: 1