/    Sign up×
Community /Pin to ProfileBookmark

MSXML2 in IE working not in firefox/safari

Hi there i have a code which runs perfectly on IE but not on firefox or safari:

[CODE]function applyXSLTWithParam(xmlFileName, xslFileName, paramName, paramValue)
{
var objXML;
var objXSLT;
var objxsltTemplate;
var objxsltProcessor;

try
{
objXML = new ActiveXObject(“MSXML2.DOMDocument.3.0”);
objXML.async = false;
objXML.validateOnParse = false;

objXSLT = new ActiveXObject(“MSXML2.FreeThreadedDOMDocument.3.0”);
objXSLT.async = false;
objXSLT.validateOnParse = false;

//Load XML and XSLT documents
objXML.load(xmlFileName);
objXSLT.load(xslFileName);

objxsltTemplate = new ActiveXObject(“MSXML2.XSLTemplate.3.0”);
objxsltTemplate.stylesheet = objXSLT;
objxsltProcessor = objxsltTemplate.createProcessor();
objxsltProcessor.input = objXML;
objxsltProcessor.addParameter(paramName, paramValue);

objxsltProcessor.transform();

return objxsltProcessor.output;
}
catch(e)
{
//error handling
}
}

function GetEmpList()
{
empList.innerHTML = applyXSLT(“lijn.xml”, “EmpForHTML1.xsl”);
}

function showEmpDetails(empID)
{
empDetails.innerHTML = applyXSLTWithParam(“wo.xml”, “EmpForHTML2.xsl”, “empID”, empID);
}

//–>[/CODE]

What needs to be changed for getting this to work in Firefox/Safari?

to post a comment
JavaScript

1 Comments(s)

×

Success!

Help @Subby80 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...