Hi Guys...
I'm having problem with XML transformation. I have this code where I click a link that will open a new window that is referenced to XML. It works fine in IE but in Firefox, a new window is opened and the contents are not displayed.
Here's a code snippet:
if (window.ActiveXObject) //code for IE
{
xslDoc=new ActiveXObject("Microsoft.XMLDOM");
xslDoc.async=false;
xslDoc.load(xslPath);
transformxsl();
}
//code for Mozilla, Firefox
else (document.implementation && document.implementation.createDocument)
{
xslDoc=document.implementation.createDocument("","",null);
xslDoc.load(xPath);
xslDoc.onload=transformxsl;
}
function transformxsl()
{
[COLOR="red"]var OpsDocStr = xmlDoc.transformNode (xslDoc)[/COLOR]
document.getElementById("it").innerHTML = OpsDocStr //xmlDoc.transformNode (xslDoc)
}
The line in red is where the error is:
xmlDoc.transformNode is not a function
Can anyone help me???
Will really appreciate it. Thanks.