Link to home
Start Free TrialLog in
Avatar of crv
crv

asked on

How to download an ActiveX automatically and register it into the system?

This is a script file written to test the IETimer.ocx

<HTML>

<HEAD><TITLE>Timer Function </TITLE></HEAD>

<BODY onload="StartTimer();">
Timer Function
<object id="timer1"
classid="clsid:59CCB4A0-727D-11CF-AC36-00AA00A47DD2">
<param name="Interval" value="2000"><param
name="Enabled" value="false"></object>
<SCRIPT LANGUAGE="JavaScript" FOR="timer1" EVENT="Timer()">
<!--
    Timer1_timer()
-->
</SCRIPT>

<script langugae="JavaScript">
<!--
function StartTimer()
{
      timer1.Enabled = true
      
}
var nCount = 0
function Timer1_timer()
{
      nCount++;
      document.test.count.value = nCount;
      
}
//-->
</script>

Test Page
<br>
<form name=test >
<input type=text name=count value=0>
</form>

</BODY>
</HTML>


When this is executed in WinNT IE4.0 the ocx was automatically downloaded from the internet and the timer started working.  When the same was executed on Win 95 it did not work.  I got a script error while accessing the property of the timer which means the control was not registered properly.  The same thing happens for WinNT IE 3.0 browsers.  What is the reason?  Is there any way by which it can be downloaded and registered automatically?  What are all the steps needed for this?
ASKER CERTIFIED SOLUTION
Avatar of percyn
percyn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial