web页面调用ActiveX控件
问题描述:
在静态页中调用ActiveX控件,将页面文件通过IE的方式打开,ActiveX控件可以正常调用。但是将页面部署到tomcat中进行发布,再通过浏览器访问tomcat服务器时,控件无法调用。提示“对象不支持此属性或方法”。
请问哪位高手对ActiveX控件的调用比较熟悉或者遇到过类似的问题,寻求解决办法!、
谢谢!
代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"/TR/html4/loose.dtd">
<html>
在静态页中调用ActiveX控件,将页面文件通过IE的方式打开,ActiveX控件可以正常调用。但是将页面部署到tomcat中进行发布,再通过浏览器访问tomcat服务器时,控件无法调用。提示“对象不支持此属性或方法”。
请问哪位高手对ActiveX控件的调用比较熟悉或者遇到过类似的问题,寻求解决办法!、
谢谢!
代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"/TR/html4/loose.dtd">
<html>
<head>
<base href="localhost:7000/OcxTest/">
<title>My JSP 'index.jsp' starting page </title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<base href="localhost:7000/OcxTest/">
<title>My JSP 'index.jsp' starting page </title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page.
<br>
<OBJECT ID="Sipstack1" WIDTH=100 HEIGHT=51
CLASSID="CLSID:C73D20E9-2908-4C98-91C8-5736D2AE6171" CODEBASE="localhost:7000/OcxTest/sipstack.cab#version=1,0,0,0">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>
<br/>
<div id = "tip" > </div>
<input type="button" value="初始化" onclick="javascript:testOcx();">
<input type="button" value="拨号" onclick="javascript:call();">
<input type="button" value="挂断" onclick="javascript:handup();">
<br>
<OBJECT ID="Sipstack1" WIDTH=100 HEIGHT=51
CLASSID="CLSID:C73D20E9-2908-4C98-91C8-5736D2AE6171" CODEBASE="localhost:7000/OcxTest/sipstack.cab#version=1,0,0,0">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>
<br/>
<div id = "tip" > </div>
<input type="button" value="初始化" onclick="javascript:testOcx();">
<input type="button" value="拨号" onclick="javascript:call();">
<input type="button" value="挂断" onclick="javascript:handup();">
<input type="button" value="接听" onclick="javascript:accept();">
</body>
<script type="text/javascript" language="javascript">
var sipstackObj = ElementById("Sipstack1");
var tipObj = ElementById("tip");
var incomingTel = null;//存储来电
//初始化
function testOcx(){
sipstackObj.Initialize("2845","2845","172.16.9.15");
tipObj.innerHTML = "控件初始化...";
}
/
</body>
<script type="text/javascript" language="javascript">
var sipstackObj = ElementById("Sipstack1");
var tipObj = ElementById("tip");
var incomingTel = null;//存储来电
//初始化
function testOcx(){
sipstackObj.Initialize("2845","2845","172.16.9.15");
tipObj.innerHTML = "控件初始化...";
}
/
/(2845)
function call(){
var sipstackObj = ElementById("Sipstack1");
sipstackObj.Invite("2845");
tipObj.innerHTML = "2845中...";
}
//挂断电话
function handup(){
sipstackObj.Hangup();
tipObj.innerHTML = "挂断电话";
}
//接听
function call(){
var sipstackObj = ElementById("Sipstack1");
sipstackObj.Invite("2845");
tipObj.innerHTML = "2845中...";
}
//挂断电话
function handup(){
sipstackObj.Hangup();
tipObj.innerHTML = "挂断电话";
}
//接听
function accept(){
sipstackObj.Accept("");
tipObj.innerHTML = "接听中...";
}
</script>
<!-- 注册ocx控件的事件 -->
<!-- 显示状态通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayStatus(message)">
ElementById("tip").innerHTML = "初始化:" + message;
</SCRIPT>
<!-- 来电通知 -->
sipstackObj.Accept("");
tipObj.innerHTML = "接听中...";
}
</script>
<!-- 注册ocx控件的事件 -->
<!-- 显示状态通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayStatus(message)">
ElementById("tip").innerHTML = "初始化:" + message;
</SCRIPT>
<!-- 来电通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="invReceived(message)">
incomingTel = message;
ElementById("tip").innerHTML = "来电:" + message;
</SCRIPT>
<!-- 连接断开通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="byeReceived(message)"> 浏览器的activex控件
ElementById("tip").innerHTML = "挂断:" + message;
</SCRIPT>
<!-- 显示url -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayUrl(message)">
ElementById("tip").innerHTML = "来电URL:" + message;
</SCRIPT>
incomingTel = message;
ElementById("tip").innerHTML = "来电:" + message;
</SCRIPT>
<!-- 连接断开通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="byeReceived(message)"> 浏览器的activex控件
ElementById("tip").innerHTML = "挂断:" + message;
</SCRIPT>
<!-- 显示url -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayUrl(message)">
ElementById("tip").innerHTML = "来电URL:" + message;
</SCRIPT>
<!-- 通知消息 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="notifyReceived(url, status, img)">
ElementById("tip").innerHTML = "通知:" + url + "-" + status + "-" + img;
</SCRIPT>
<!-- 未知使用者 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="unknownSubscribe(url)">
ElementById("tip").innerHTML = "未知使用者:" + url;
</SCRIPT>
<!-- 需要身份验证 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="authRequired(realm, user
name)">
ElementById("tip").innerHTML = "需要身份验证:" + realm + "-" + username;
</SCRIPT>
<!-- 显示消息通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayMessage(msg)">
ElementById("tip").innerHTML = "显示消息通知:" + msg;
</SCRIPT>
<!-- 显示告警 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayWarning(warning)">
ElementById("tip").innerHTML = "显示告警:" + warning;
</SCRIPT>
ElementById("tip").innerHTML = "需要身份验证:" + realm + "-" + username;
</SCRIPT>
<!-- 显示消息通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayMessage(msg)">
ElementById("tip").innerHTML = "显示消息通知:" + msg;
</SCRIPT>
<!-- 显示告警 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayWarning(warning)">
ElementById("tip").innerHTML = "显示告警:" + warning;
</SCRIPT>
<!-- 显示问题 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="displayQuestion(question)">
ElementById("tip").innerHTML = "显示问题:" + question;
</SCRIPT>
<!-- 即时消息通知 -->
<SCRIPT LANGUAGE="javascript" FOR="Sipstack1" EVENT="textReceived(url, msg, room)">
ElementById("tip").innerHTML = "即时消息通知:" + url + "-" + msg + "-" + room;
</SCRIPT>
</html>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论