I have this ridicolously easy piece of code. It works flawlessly on Firefox and Chrome but not in IE. I’ve never debugged on IE so maybe is a well known problem.
for (i = 0; i < word_array.length; i++) {
word_array[i].weight = parseFloat(word_array[i].weight, 10);
}
It says word_array is null or not an object.
word_array is an array containing objects with a weight field and a string field. If i try to print for example
word_array[0].weight
just before this code, it works. Same for printing the index “i” and parseFloat(…).
Posting this as an answer as it won’t fit in a comment…
The first thing I look for in IE JavaScript problems is trailing commas in arrays or objects. For example
This will work in non-IE browsers but fail in all sorts of ways in IE.
Also, is your “string field” actually called “string”? This may cause problems though I could be wrong.