Windows Script Components  

fireEvent Method

Sends notification of a custom event from the script component to the host application.



The name of the event as defined in the <event> element.


You can only fire events if they have been declared in the <public> element.

Note   The Behavior handler exposes a fireEvent method that is similar to the Automation handler version, but which includes support for event objects. For details, see Exposing Custom Events in Behavior Script Components.


The following shows a fragment of a script component that defines the event namechanged and shows how to fire it.

Note   A CDATA section is required to make the script in the <script> element opaque. For details, see Script Component Files and XML Conformance.
   <property name="name">
   <event name="namechanged">

<script language="VBScript">
var name
Sub get_lowercaseName()
   get_lowercaseName = name
End Sub

Sub put_lowercaseName(newLCName)
   name = newLCName
End Sub

See Also

<event> Element | Exposing Events | fireEvent (Behavior)