javascriptxmlhttprequestlotus-dominodomino-designer-eclipsehcl-notes

HCL Notes 11 - Javascript - context.text not working in firefox but works in IE


The below code works in IE but not in other browsers.

var node = xmlHttp.responseXML.documentElement;
var eitems = node.getElementsByTagName("nib:ProcessRequestResponse");
txt = eitems.context.text;
txt2 = txt.replace("\n", "");

Gives error "eitems.context is undefined". I have also tried eitems.context.textContent, eitems.context.innertext, eitems.context.innerHTML. All gives same error.


Solution

  • I used txt = node.textContent to get the content of tag and it worked