IE中可以在HTML页面中使用function test()
{
var objTest;
try
{
     objTest = new ActiveXObject("test.test");
              alert("Object created");
}
catch(objError)
{
              alert("Fail to create object. error:" + objError.description);
}}的方式建立实例并取得错误码.但在Netscape中好象并不支持ActiveX对象.问一下各位是否有一种简单的方法实现在Netscape中创建ActiveX对象,而不需要重新为Netscape写一个PlugIn?

解决方案 »

  1.   

    我觉得应该让用Netscape的那个家伙改用IE.这样不就轻松搞定了
      

  2.   

    有一个例子PluginHostCtrl,可以实现创建的ActiveX对象同时用于IE跟Netscape环境.但我发现对原来ActiveX对象的改变太多.所以不采用PluginHostCtrl的方式.
      

  3.   

    To AttaBoy(网际游魂),有道理.呵呵.只是我们要让用Netscape的家伙掏钱用我们的东西.你知道现在有钱就是大爷的.因为这样要搞定就不轻松了.
      

  4.   

    you need a plug-in to run activex inside Netscape
      

  5.   

    To saucer(思归),这么说还是要用PLUGIN来HOST ActiveX控件.同时这个控件不能被IE识别的.好象比PluginHostCtrl还要单一.其实我想实现的是在Netscape中判断某个ActiveX对象是否存在.若加载成功就说明存在.其他用来判断某个ActiveX对是否存在也可以读客户系统的Registry.不过好象Javascript不能访问客户的Registry.
      

  6.   

    look here:
    http://www.iol.ie/~locka/mozilla/mozilla.htm......
    Mozilla ActiveX Control
    Embed the Mozilla browser engine (Gecko) into any ActiveX application. This control implements  the same APIs as the Internet Explorer control making porting of existing applications reasonably straightforward. ActiveX Control For Plugins
    Embed plugins in any ActiveX application. This control can host most Netscape Plugin API (LiveConnect) plugins, allowing them to use them in your existing ActiveX applications, including Internet Explorer. Plugin For ActiveX controls
    Embed ActiveX controls in any NP API application. This plugin hosts ActiveX controls allowing them to be used in browser such as Netscape 4.x/6.x, Mozilla and Opera.
      

  7.   

    多谢saucer(思归),你说的站点就是我上面说的PluginHostCtrl例子.因为它对ActiveX的改动比较大,所以我想问一下是否有简单一点的方法.如果没有其他的方法,这就是我最后的选择了.
      

  8.   

    Only XPCOM can be loaded in mozilla browser and IE browser.