Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught ReferenceError: ActiveXObject is not defined Error in Chrome

i have this error in Chrome "Uncaught ReferenceError: ActiveXObject is not defined "

my code is

function loadModel() {

            //----------------------------------------------------------------------------------------------
            document.getElementById("lModelMsg").innerText = "Loading...";
            document.getElementById("lPartMsg").innerText = "";
            var dMfg = document.getElementById("dManufacturer");
            var id = dMfg.options[dMfg.selectedIndex].value;
            var xml = CreateAsset.LoadModel(id);
            var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
            var Flag;
            Flag = xmlDoc.loadXML(xml.value);
            if (Flag) {......................
like image 503
Dawood Ahmed Avatar asked Jul 29 '13 14:07

Dawood Ahmed


1 Answers

ActiveX is a Microsoft-proprietary framework. It is supported only in MS products (i.e, IE)

You can use jQuery's parseXML method as a cross-browser alternative.

like image 126
MasterAM Avatar answered Sep 19 '22 18:09

MasterAM