View Full Version : Error: cs = ni.getElementsByTagName is not a function

15 Oct 2010, 3:56 AM
I'm getting this error:
cs = ni.getElementsByTagName is not a function

I'm working in an Editor Grid and i'm doing some Ext.Ajax.request for validation and data synchronisation.
The error occurs after e.grid.store.loadData(xmldata) is executed in the success function on the request.

(Code from ext-all-debug-w-comments.js, ExtJS 3.3.0)
// no mode specified, grab all elements by tagName
1375 // at any depth
1376 if(!mode){
1377 for(var i = 0, ni; ni = ns[i]; i++){
1378 cs = ni.getElementsByTagName(tagName);
1379 for(var j = 0, ci; ci = cs[j]; j++){
1380 result[++ri] = ci;
1381 }
1382 }

Firebug reports that the function above throws the error.

Apparently its used to loop through a XML file.
ns holds the entire xml, and ni holds just one character of ns(at the time of the error ni='<').
With these values, it makes sense that the function getElementsByTagName does not exist.
My question is: Am I passing the wrong values or is this a bug in ExtJs?

10 Aug 2011, 2:32 AM
Someone solved this issue?