#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Converting from ActiveX


    I have a web application that has some functionality based on ActiveX. Basically, it is a file library and I am having trouble ridding myself of the activeX so it will work on i-pads or android browsers. My Cold Fusion server is the older 6.1 running on a Windows 2000 server with IIS. Old I know. Can someone help point me in the right direction to make this snippet work with non IE browsers? I'd appreciate any direction you can provide.

    function getxml(path, targetId, filetype) {
    var objParser = new ActiveXObject("Microsoft.XMLDOM")
    objParser.async = false;
    objParser.load(path);
    targetElement = document.all(targetId);
    targetElement.innerHTML = generateHTML(objParser, 1, filetype);
    }
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    Active-X is IE-specific, so there is no way to convert this to work in other browsers. You'll have to switch to HTML and JavaScript to do whatever this control is doing.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Answer


    Thanks for the reply. Although you kind of told me back what I knew and was trying to fix I guess I could have been more clear. Regardless, I found the answer and wanted to post it for anyone that might happen across this forum. The answer was XMLHttpRequest() versus activex so I set it up to use either.

    function getxml(path, targetId, filetype) {
    if (window.ActiveXObject){
    var objParser = new ActiveXObject("Microsoft.XMLDOM")
    objParser.async = false;
    objParser.load(path);
    targetElement = document.all(targetId);
    targetElement.innerHTML = generateHTML(objParser, 1, filetype);
    } else {
    var objParser=new XMLHttpRequest();
    objParser.open("GET",path,false);
    objParser.send();
    return objParser.responseXML;
    targetElement = document.all(targetId);
    targetElement.innerHTML = generateHTML(objParser, 1, filetype);
    }
    }
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    Glad you got it working. To be fair, since you didn't explain anything about what the ActiveX control was actually doing, providing a more detailed response wasn't really possible. You said it was a "file library" so I assumed it was some sort of tree UI interface similar to Windows Explorer.

IMN logo majestic logo threadwatch logo seochat tools logo