J
jose.mendez22
I wrote a simple ocx to test an event handler from an html page. I
complied the ocx, and packaged the ocx (internet package) to my
webserver. I can veiw the control just fine in my web page, however
when I fire the event in the ocx I can't capture the event in my asp
script. any suggestions? below is the code.
Thanks in advance any feedback!
ocx script
===========
Event evntTester(ByVal Mesg As String)
Private Sub Command1_Click()
Frame1.BackColor = &H80FFFF
RaiseEvent evntTester("This should display")
End Sub
vbscript sample
=================
<html>
<head>
<title>ocx test</title>
<script language="vbscript">
sub UserControl1_evntTester(pmsg)
MsgBox("Event handler value= " & pmsg)
end sub
</script>
-- note: I also tried using the follwoing
-- <script language="vbscript" for="UserControl1" event="evntTester">
-- MsgBox("in Event handler")
--</script>
</head>
<body>
<% response.Write("Hello world")
response.Write("<br>")
%>
<OBJECT ID="UserControl1"
CLASSID="CLSID:86CDA2B2-0648-42A6-9F87-75E32FEA71AF"
CODEBASE="test.CAB#version=1,0,0,1" VIEWASTEXT>
</OBJECT>
</body>
</html>
complied the ocx, and packaged the ocx (internet package) to my
webserver. I can veiw the control just fine in my web page, however
when I fire the event in the ocx I can't capture the event in my asp
script. any suggestions? below is the code.
Thanks in advance any feedback!
ocx script
===========
Event evntTester(ByVal Mesg As String)
Private Sub Command1_Click()
Frame1.BackColor = &H80FFFF
RaiseEvent evntTester("This should display")
End Sub
vbscript sample
=================
<html>
<head>
<title>ocx test</title>
<script language="vbscript">
sub UserControl1_evntTester(pmsg)
MsgBox("Event handler value= " & pmsg)
end sub
</script>
-- note: I also tried using the follwoing
-- <script language="vbscript" for="UserControl1" event="evntTester">
-- MsgBox("in Event handler")
--</script>
</head>
<body>
<% response.Write("Hello world")
response.Write("<br>")
%>
<OBJECT ID="UserControl1"
CLASSID="CLSID:86CDA2B2-0648-42A6-9F87-75E32FEA71AF"
CODEBASE="test.CAB#version=1,0,0,1" VIEWASTEXT>
</OBJECT>
</body>
</html>