This sample is located in \Samples\Scripting\Event.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample shows how to handle events from Java applets using scripting. The EventExample applet sources an event called DoClick. The HTML page sinks the event and displays a message box.
The sample provides two instances of the same applet: the first uses Microsoft® Visual Basic® Scripting Edition (VBScript) to sink a DoClick event, and the second uses JavaScript. The event wiring occurs by passing the FiresScriptEvents=true parameter to the Java object using the <PARAM> tag in the .htm file.
You must have Microsoft® Internet Explorer 4.0 or later installed to use this sample.
To use the sample
The sample displays two buttons, each labeled Fire DoClick.
This class creates a new EventExample object, sets the layout, and adds a Fire DoClick button. The code also registers a listener to receive events from the EventExample object and fires the DoClick event when a button is pressed.
EventExampleListener.javaThis class defines the event interface for the EventExample object.