CB编写的ActiveX控件,当IE页面中刷新或者后退再进入时报地址访问错,请问是什么原因?
我用CB6.0编写的ActiveX控件(.ocx),网页为Php的,当IE页面中刷新或者后退再进入时,控件报地址访问错,0x....一大串,请问各位大侠,这是怎么一回事儿,如何解决?谢谢
!
这样的问题在我使用ASP的时候也同样出现!!
附操作流程:用户进入登录页面,输入用户名和密码,校验通过则进入主页面,主页面中调用我写的控件,有交互的,需要把登录的用户名传递给控件。
附:php网页源码:
<?php
session_start();
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link href="css/iamzht.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY onload="GetScreenParam()" leftmargin="0" topmargin="0">
<center>
<table id="mytb01" width="1024" border="0" cellspacing="0" cellpadding="0" align="center" height="33">
<tr>
<td>
<table id="mytb02" width="1024" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="myimg" width="1024" height="0" background="images/banner_dl.jpg">
<span id="title" class="zzz"></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table id="mytb03" width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="left" valign="top">
<td colspan="3">
<OBJECT id="video"
classid="clsid:D12EF980-A56F-44B8-934C-7EAD80098F1B"
codebase="iecab.cab#version=1.0.0"
align=center
hspace=0
vspace=0
>
<param name="MyCon" value="mycaption">
</OBJECT></td>
</tr>
</table>
<input id="myip" type="hidden" name="myip" value="<? echo $_SESSION['ip']; ?>">
<input id="myuser" type="hidden" name="myuser" value="<? echo $_SESSION['usr']; ?>">
<input id="mypass" type="hidden" name="mypass" value="<? echo $_SESSION['pass']; ?>">
<Script>
video.My_CurrSvrIP=myip.value
video.My_CurrUser=myuser.value
video.My_CurrPwd=mypass.value
video.MyStart()
</Script>
</div>
<Script language="javascript">
function GetScreenParam()
{
var MyWidth = document.body.clientWidth-2;
var MyHeight = document.body.clientHeight+15;
document.getElementById("mytb01").style.width=MyWidth;
document.getElementById("mytb02").style.width=MyWidth;
document.getElementById("mytb03").style.width=MyWidth;
document.getElementById("myimg").style.width=MyWidth;
document.getElementById("video").style.height=MyHeight;
document.getElementById("video").style.width=MyWidth;
}
</Script>
</td>
</tr>
</table>
</center>
</BODY>
</HTML>
[解决办法]
CB6.0编写的ActiveX控件源码贴出来吧