I am trying to catch an event in the VBSCRIPT of an html page but I can’t make it work. I must have missed a step.
This is the code of my usercontrol (VB6):
Public Event sendText(ByVal Text As String)
Private Sub Command1_Click()
RaiseEvent sendText(Text1.Text)
End Sub
And this is the code of my web page (HTML):
<form>
<OBJECT name="ActiveX" id="ActiveX" classid="clsid:..."></OBJECT>
<script language="VBScript">
Sub ActiveX_sendText(Text)
Msgbox("aaa" & Text)
End Sub
</script>
</form>
The Event is raised in the user control when clicking the Command1 button, but I never get into the VBSCRIPT function.
I am using IE8/IE8 Standard.
Any clue?
It was a problem in the configuration of security rules in Internet Explorer. After enabling unsigned ActiveX, the issue was solved.