I created a usercontrol with one button.

*********************
Option Explicit
Public Event onBeforeAdd()

Public Sub Command1_Click()
RaiseEvent onBeforeAdd
End Sub
************************

In html:

************************
<HTML><HEAD>
<SCRIPT language="VBScript">
sub xx_onBeforeAdd()
msgbox "fired!"
end sub
</SCRIPT>
</HEAD>
<BODY>
<OBJECT id="xx" style="LEFT: 0px; TOP: 0px" classid="clsid:6EC82592-BC4B-480D-83FA-C53AABA401E1"
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="8467">
<PARAM NAME="_ExtentY" VALUE="6350"></OBJECT>

</BODY></HTML>
***********************
The problem is that I can not get the messege box when I click the button
of the control on web page. However, things work if I put the control in
a vb form.