Length of an HTMLObjectCollection is incorrect in Internet Explorer
- by Mayank Gupta
I have three cells in different rows in a table having same name.e.g.
<td name = "x">
is present in 3 different rows.
I am using document.getElementsByName() to obtain a collection of these cells and trying to calculate the length of this collection. e.g.
var obj = doucment.getElementsByName("X");
var length = obj.length;
This code works fine in Google Chrome but in IE the length is return as 0(zero).
Can anyone tell me how to sove this problem in IE?