Johnnie100
Programmer
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="GENERATOR" Content="Microsoft Visual Studio 6.0">
<text>User Location OCX Test</text>
<!-- User Location Active-X control-->
<OBJECT ID="ucUserLocation" WIDTH="1" HEIGHT="1"
CLASSID="CLSID:223FA00C-F370-4A66-9CEB-D424CD763E19"
CODEBASE="UserLocation.CAB#version=1,0,0,0">
</OBJECT>
</head>
<body>
<INPUT id="Test" name="Test" type="button" value="Test OCX" onclick="test_onclick()">
</body>
</html>
<SCRIPT LANGUAGE="VBScript">
<!--
sub Test_onclick()
msgbox "User Location ID is " & ucUserLocation.LocationID
end sub
-->
</SCRIPT>
This works fine in IE5.5 but with IE4 the following error is returned:
"An error has occurred on the script on the page:
...
...
Object does not support this method or property..
Error code = 0"
Any ideas? (I have enabled ActiveX in IE4 security settings and any OCX is safe for initialization and scripting)
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="GENERATOR" Content="Microsoft Visual Studio 6.0">
<text>User Location OCX Test</text>
<!-- User Location Active-X control-->
<OBJECT ID="ucUserLocation" WIDTH="1" HEIGHT="1"
CLASSID="CLSID:223FA00C-F370-4A66-9CEB-D424CD763E19"
CODEBASE="UserLocation.CAB#version=1,0,0,0">
</OBJECT>
</head>
<body>
<INPUT id="Test" name="Test" type="button" value="Test OCX" onclick="test_onclick()">
</body>
</html>
<SCRIPT LANGUAGE="VBScript">
<!--
sub Test_onclick()
msgbox "User Location ID is " & ucUserLocation.LocationID
end sub
-->
</SCRIPT>
This works fine in IE5.5 but with IE4 the following error is returned:
"An error has occurred on the script on the page:
...
...
Object does not support this method or property..
Error code = 0"
Any ideas? (I have enabled ActiveX in IE4 security settings and any OCX is safe for initialization and scripting)