Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.7k views
Welcome To Ask or Share your Answers For Others

1 Answer

Figured it out. Have to use .charAt() instead of treating a string as an array in ie6 and 7.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...