Why the following code doesn't work (alert is not executed)? `custom_table` is some file upload fields in html, its length is 10.

```
var custom_table=document.getElementsByName('custom_table');
var result = custom_table.filter( function (x)  { return x.value });
alert(result.length);

```

If I replace `custom_table` with `names` in the following code, it works fine.

```
var names = new Array();
var object = { name : "Joe", value:20, email: "joe@hotmail.com"};

names.push(object);
object = { name : "Mike", value:50, email: "mike@hotmail.com"};
names.push(object);
object = { name : "Joe", value:45, email: "mike@hotmail.com"};
names.push(object);

```

Thanks.