Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Component In IE4

Status
Not open for further replies.

Johnnie100

Programmer
Dec 8, 2000
31
GB
Hi.
I created a custom ocx in VB6 to be executed by client-side script to read a registry setting on a client running IE4 (SP2).
The ocx is apartment threaded and I used the MS Package and Deployment wizard to create a cab-based installation package that will be downloaded from the server.
I added the control to an html page as follows:
<html>
<head>
<meta NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<text>User Location OCX Test</text>

<!-- User Location Active-X control-->
<OBJECT ID=&quot;ucUserLocation&quot; WIDTH=&quot;1&quot; HEIGHT=&quot;1&quot;
CLASSID=&quot;CLSID:223FA00C-F370-4A66-9CEB-D424CD763E19&quot;
CODEBASE=&quot;UserLocation.CAB#version=1,0,0,0&quot;>
</OBJECT>
</head>
<body>
<INPUT id=&quot;Test&quot; name=&quot;Test&quot; type=&quot;button&quot; value=&quot;Test OCX&quot; onclick=&quot;test_onclick()&quot;>
</body>
</html>

<SCRIPT LANGUAGE=&quot;VBScript&quot;>
<!--
sub Test_onclick()
msgbox &quot;User Location ID is &quot; & ucUserLocation.LocationID
end sub
-->
</SCRIPT>

This works fine in IE5.5 but with IE4 the following error is returned:
&quot;An error has occurred on the script on the page:
...
...
Object does not support this method or property..
Error code = 0&quot;

Any ideas? (I have enabled ActiveX in IE4 security settings and any OCX is safe for initialization and scripting)
 
try forum329

I'm sure IE4 jsut does not support a method in the script and you'll need to rewrite for a work around, but the vbscript forum will be a better place to futher discuss teh problem

_____________________________________________________________________
onpnt2.gif

The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top