Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 1998-03-04
1
Medium Priority
?
199 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:crv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
percyn earned 200 total points
ID: 1278574
The <object> tag WILL instantiate the control if already installed. If it is not installed, you need to use the CODEBASE tag to point to the control, so that the browser can download and register it.

<OBJECT ID="Menu1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:F5131C24-E56D-11CF-B78A-444553540000"
CODEBASE="#version=1,0,0,9">
...
...
</Object>
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question