Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there any way to avoid ActivexObject in JavaScript for reading documents ?

    In need of desperate guidance

    1. Is there any way to avoid ActivexObject in JavaScript for reading documents and constructing xmls?

    2. Actual there is a problem with the client, he doesn’t like the IE security settings like "Access data source across domains" under Miscellaneous and "Run ActiveX controls and plug-ins".

    And It should support IE 7, 8 and above. If possible that should work in cross browser also.

    Currently in JavaScript, we are using the below codes:

    var xmlDoc = new ActiveXObject("MSXML2.DOMDocument"); -->for xml construction.

    var stm = new ActiveXObject("ADODB.Stream"); --> for reading the doc and docx file from client temporary path.

    What is needed:

    1. We need to find an alternate in order to avoid using the ActiveXobject.

    OR

    2. We need to automate the Internet Security Settings in client machine.

    Could some one help me in this please?

    Thanks
    Nanda

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,300
    Thanks
    10
    Thanked 586 Times in 567 Posts
    i can see why a client wouldn't want to open up huge holes in every site they visit by disabling the Same Origin Policy...

    1. do you have access to an active server of some sort (asp, php, etc) ?

    2. does the file live next to the page, or on the client's desktop machine?
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,631
    Thanks
    0
    Thanked 648 Times in 638 Posts
    document.implementation.createDocument is the standard equivalent to MSXML2.DOMDocument
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,300
    Thanks
    10
    Thanked 586 Times in 567 Posts
    Quote Originally Posted by felgall View Post
    document.implementation.createDocument is the standard equivalent to MSXML2.DOMDocument
    i thought that makes an html document, not an XML document?

    Code:
    "links" in document.implementation.createDocument ('http://www.w3.org/2005/Atom', 'channel', null);
    links is an html document feature, not an xml one, which has no concept of links. .images[] and the rest are present as well, leading me to believe that we're looking at an html doc...

    i think what we are looking for is DOMParser(), whose support starts at IE9 and all the real browsers way before that.
    Last edited by rnd me; 10-31-2013 at 06:43 PM.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •