Why does 01->07 work and 08 & 09 don't???
Flash8 AS2
In attempt to remove leading 0's from an input text field I tested for 01 through 07 and everything seemed to work OK.
When I get to 08 and 09 it doesn't work.
Here's a portion of the code:
// this works
if (kids == 07) {
kids = 7;
}
// this does not work unless 08 is changed to 8
if (kids == 08) {
// kids = 8;
}
This checks OK and auto formats OK, but when I make the 8 to 08 in the if statement, I get an error message. Same with 09.
The = and == do not seem to make any difference, just the 08 and 09.
It's got to be me messed up, but I can't see any logical reasoning for this.