# Javascript, getElementsByTagName, IE7 VS FF3



## Tobeon (Mar 24, 2004)

```
var viewEntries = request.xmldoc.getElementsByTagName('viewentries').item(0);
       alert("childnodelength: " + viewEntries.childNodes.length);
```
In IE7 the alert comes back as 7 (which is what I want it to be) however in FF it comes back as 15

I generally assume that Firefox is correct, following standards and generally doing the right thing and therefore I am doing something wrong with my code.

Any ideas? (or is that not enough code to really know whats going on?)

Thansk very muchskly

_Edit: I managed to do a bit of a hack to get around the problem so this issue isn't a big deal any more, however I am still curious to why this bit of code works differently in different browsers (plus it would be better if I could fix it properly as opposed to hacking around the problem)_


----------



## MMJ (Oct 15, 2006)

Try

*var viewEntries = request.xmldoc.getElementsByTagName('viewentries')[0]*

and see if both browsers give the same value.


----------



## Tobeon (Mar 24, 2004)

Nope, they are still producing different values

(IE7 gives 4 which I what I want and FF3 gives 9 which I don't)


----------

