R
ripken95
I create the ATL Object control and wrap it in the cab file.
If a user downlaods .cab file from the HTML document successfully,
my control can correctly work.
But I want to show the error messages with javascript if the user
cannot download the file or the error occurs when downloading the .cab
file.
What should I do for my ATL object control or add some check codes with
javascript?
Maybe I guess it should be like as follows but it can not work correctly:
<script language="javascript">
<!--
function UA_OnInit()
{
if(test2==null)
alert("A error occurs when downloading");
}
-->
</script>
<HTML>
<HEAD>
<TITLE>ATL 3.0 test page for object test2</TITLE>
</HEAD>
<BODY bgcolor="#ffffff" language=javascript onload="UA_OnInit()">
<OBJECT ID="test2" CLASSID="CLSID:5C836C70-4909-477C-A1E1-643602ADD810"></OBJECT>
</BODY>
</HTML>
Can anyone give some suggestions for me? Regards.
If a user downlaods .cab file from the HTML document successfully,
my control can correctly work.
But I want to show the error messages with javascript if the user
cannot download the file or the error occurs when downloading the .cab
file.
What should I do for my ATL object control or add some check codes with
javascript?
Maybe I guess it should be like as follows but it can not work correctly:
<script language="javascript">
<!--
function UA_OnInit()
{
if(test2==null)
alert("A error occurs when downloading");
}
-->
</script>
<HTML>
<HEAD>
<TITLE>ATL 3.0 test page for object test2</TITLE>
</HEAD>
<BODY bgcolor="#ffffff" language=javascript onload="UA_OnInit()">
<OBJECT ID="test2" CLASSID="CLSID:5C836C70-4909-477C-A1E1-643602ADD810"></OBJECT>
</BODY>
</HTML>
Can anyone give some suggestions for me? Regards.