This murdered a good half hour of my time splattered with lots of alert() statements to debug. Basically, in Firefox you can do this:


var word = "Peter";
alert(word[1]); // "e" in Firefox, undefined in IE

This is the wrong way to get to character in a string in Javascript. The correct way is to use charAt() like this:


var word = "Peter";
alert(word.charAt(1)); // "e" in Firefox and IE

I don't know about the other browsers but finally Crosstips.org now works in IE7 too. I haven't even looked at it in IE6 and don't intend to either.

Comments

Your email will never ever be published.

Previous:
Sandisk SSD v/s HDD March 4, 2009 Misc. links
Next:
Nginx vs. Squid March 17, 2009 Linux
Related by category:
You don't need a context or state manager for TanStack Query in scattered React components January 2, 2026 JavaScript
Always run biome migrate after upgrading biome August 16, 2025 JavaScript
Video to Screenshots app June 21, 2025 JavaScript
gg2 has a web page now January 5, 2026 JavaScript
Related by keyword:
An example of using Immer to handle nested objects in React state January 18, 2019 React, JavaScript