Javascript object.textContent == undefined in IE 9 only

pieseeelediam

New Member
I've an issue with IE9 with the following code:\[code\]var XMLDocument = data; var erreurs = new Array(); var test = data.lastChild.lastChild.childNodes; for(var i=0; i<test.length; i++) { //var testx = test.textContent; //alert("Test"+i+" = "+testx); var testx = getText(test); alert(testx); erreurs = testx; }function getText(el) { return el.textContent || el.innerText || el.nodeValue || '';}\[/code\]In FF, Opera and Safari, this code works fine.In IE, it gives me:
Test0 = undefined
Test1 = undefined My XML: \[code\]<error> <missing>1</missing> <missing>2</missing> <missing>a</missing></error>\[/code\]I just want to return the values of the nodes "missing".Thank you very much for your help.
 
Back
Top