Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi

Monday, August 31, 2009

Internet Explorer Javascript Bug using Subscripts

While working on a project for somebody at work, we found a situation in which some script was working perfectly in all browsers, but was crashing in Internet Explorer 6.0. It turned out that if you use subscripts to access characters from a string, it gives an error. You have to do string.charAt(0) instead of string[0]. Just thought it would be something nice to note, if you ever have problems with that.

No comments: