Solved

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

Posted on 1998-03-04
1
189 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
1 Comment
 
LVL 3

Accepted Solution

by:
percyn earned 100 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now