what is alternative for activex in mozilla?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nirmalsingh
    New Member
    • Sep 2006
    • 218

    what is alternative for activex in mozilla?

    Hai all..

    ActiveXObject(" MSXML2.DOMDocum ent.3.0"); is not supported in mozilla. is there is any alternative solution to resolve this?
    My code
    Code:
    function openEditor()
    {
        try
        {
            var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.3.0");
            var xslDoc = new ActiveXObject("MSXML2.DOMDocument.3.0");
    
            xmlDoc.async = false;
            xmlDoc.validateOnParse = false;
            xmlDoc.resolveExternals = false;
            xmlDoc.load("../App_XMLFile/quotation_print.xml");
    
            xslDoc.async = false;
            xslDoc.validateOnParse = false;
            xslDoc.resolveExternals = false;
            xslDoc.load("../XSLT/quotation_print.xsl");
    
            initRTE(xmlDoc.transformNode(xslDoc), 'example.css');
        }
        catch(e)
        {
            alert(e.message);
        }
    }
    It works well in IE.
    Thanx in advance.
    -Nirmal Singh B
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    hi ...

    the alternative is to code your own component in pure js/dhtml-manner for all other browsers ... and use that for IE too ;) in case you want that. or to search for a cross-browser-ready component out in the web and simply reuse it. there is no ActiveX-counterpart in any browser ... so you shouldn't use that, except you have a strict IE-environment.

    kind regards

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      You could use ActiveX in Firefox via a plugin, but it's not officially supported. See this article paying particular attention to the warnings/notes. The plug-in only works with specific versions of Firefox, so I wouldn't recommend it. In any case, even if you do get it to work, you're still only left with support for two browsers on Windows. What about Opera, Safari, Firefox on other operating systems and many other browsers?

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        Heya, Nirmal.

        You may find this article to be helpful.

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          Another cool thing is XUL if you are interfacing with XML.

          Comment

          • balakumark
            New Member
            • Apr 2015
            • 1

            #6
            we can use Silverlight(NPA PI). At the moment they have just disabled NPAPI, You can reenable it by:

            entering 'chrome://flags' in Chrome's address bar
            clicking 'enable' under 'Enable NPAPI'
            clicking the 'relaunch now' button.

            JavaScript:
            Code:
            if (Silverlight.isInstalled("5.0")) 
            {
            	var SilverlightActiveX;
            	var strFile = "D:\\test.docx"
            	document.getElementById("Silverlight").Value = "ClientBin/SilverlightActiveX.xap";
            	SilverlightActiveX = document.getElementById("Silverlight");
            	var ret = SilverlightActiveX.Content.SL2JS.StartWord(strFile);
            	if (ret == "true")
            		return true;
            	else
            		return false;
            }
            
            Silverlight Application 
            
            namespace SilverlightActiveX
            {
                public class CreateDocument
                { 
            	[ScriptableMember]
            	public string StartWord(string strForm)
            		{
            			dynamic  objWord = AutomationFactory.CreateObject("Word.Application");
            			wordDoc = objWord.Documents.Open(strForm,false,false,false);
            			objWord.visible = true;
            			objWord.Activate();	
            		}
            	}
            }
            Likewise we can use AutomationFacto ry.CreateObject ("MSXML2.DOMDoc ument");
            Last edited by gits; Nov 23 '15, 03:04 PM. Reason: added code tags

            Comment

            Working...