我有一个 MFC activeX 可以从磁盘正常运行,但是当我将它放在服务器上时出现错误。客户端:WIN7机器服务器:运行apache的Ubunto
HTML和错误如下,请指教。10xs,那鸿
HTML:
<html>
<HEAD>
<TITLE>myFirstOCX.CAB</TITLE>
<script type="text/javascript" FOR="window">
function fn()
{
try{
document.all('Ctrl1').AboutBox();//error: object doesn't support propert
//or method AboutBox()
//OR
var obj = new ActiveXObject ("activex.activexCtrl");
obj.AboutBox ();//error: Automation server can't create object
}
catch (ex) { alert("Error: " + ex.message); }
}
</script>
</HEAD>
<body bgcolor=lightblue >
<TABLE BORDER>
<TR>
<TD><OBJECT
CLASSID="CLSID:E228C560-FA68-48E6-850F-B1167515C920"
CODEBASE="./nsip.CAB#version=1,0,0,1"
ID="Ctrl1"
name="Ctrl1">
</OBJECT>
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
<INPUT TYPE=BUTTON VALUE="Click Me" onclick="fn()" >
</TD> </TR> </TABLE>
<INPUT TYPE=TEXT ID="ConnectionString" VALUE="" >
</body>
</html>
inf 文件 [版本] ; 版本签名(NT 和 Win95 相同)不删除 signature="$CHICAGO$" AdvancedINF=2.0
[Add.Code]
nsip_ax_10.ocx=nsip_ax_10.ocx
nsip_ax_10.inf=nsip_ax_10.inf
[nsip_ax_10.ocx]
file=thiscab
clsid={E228C560-FA68-48E6-850F-B1167515C920}
RegisterServer=yes
FileVersion=1,0,0,1