Solved

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

Posted on 1998-03-04
1
195 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 100 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

729 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