Simple javascript string problem in ie6 and ie7

Posted by Jeff Lamb on Stack Overflow See other posts from Stack Overflow or by Jeff Lamb
Published on 2010-03-26T19:14:19Z Indexed on 2010/04/27 23:23 UTC
Read the original article Hit count: 372

Filed under:
|
|
|
|

I have a very simple function that takes a list of comma separated (x,y) points and imports them into a graph. I have FF, Chrome and IE8 installed. I use IETester to test for IE6 and IE7.

// Import Data
this.Import = function(data) {
    alert("Data in: "+data);
    var d;

    // Make sure the first and the last are start/ending parenthesis
    if ( (data[0] != '(') || (data[data.length-1] != ')') ) {
        alert("After if: "+data[0]+" "+data[data.length-1]);
        return false;
    }
    ...

In Chrome, FF and IE8, I don't see the "After if:" alert. In IE6 and IE7, I see the following two alerts: Data in: (52,16),(100,90) After if: undefined undefined

The "Data in" alert matches in all browsers.

Any ideas?

© Stack Overflow or respective owner

Related posts about ie6

Related posts about ie7