I am currently working on javascript project which uses backbone.js as the framework. its a pretty old project where Activex components are used in it, now i need to replace this controls completely so that even when i have my active x disabled my functionality should work as expected. How can i achieve this ? Here is my below chunk of a code which can be refereed . Thank you
function getXMLRequest() {
var xmlHttp = null;
if (location.protocol.substr(0, 4) == "http") {
try { // Firefox, Opera 8.0+, Safari
xmlHttp = new XMLHttpRequest();
} catch (e) { // Internet Explorer
try {
// i need to replace these activex controls
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
} else {
xmlHttp = new XMLCclRequest();
}
return xmlHttp;
}