To detect the errors with javascript when downloading the activex object?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top