How to: Reference: |
You define event handlers for specific events using the Event Handler editor.
Here is a brief overview of how to define events:
To open the Event Handler editor, do one of the following:
(The control will be selected in the list of controls in the Event Handler editor.)
Tip: If the control is a button, you can double-click the button to open the Event Handler editor.
The Event Handler editor is where you define the event handlers that are invoked when events occur in your application.
This editor has the following:
Contains the controls on the form, as well as the form itself. One of these controls will already be selected when you open the Event Handler editor, but you can select another one if you wish.
Contains the possible events that can happen to the control or form you selected. For a description of these events, see Events.
If you click the Maintain function button, your event handler will be a Maintain function.
If you click the JavaScript button, your event handler will be a JavaScript function.
If you click the VBScript button, your event handler will be a VBScript function.
If you click the Web link button, your event handler will be a web link.
The Delete button deletes code for the existing event handler.
If you click the Maintain function button, the code for closing your form (SELF.WINCLOSE();) is inserted.
Note: This code should be the last line of code in the event handler. Do not enter any code after this syntax. It will not be executed.
If you use this command to close the last form in your application, thus closing the application, you will receive an Invalid Response message from your browser. This behavior is expected. You should use the Self.WinExit (); syntax to exit your application.
If you click the Maintain function button, the code for closing your application (self.WinExit();) is inserted.
Note: This code should be the last line of code in the event handler. Do not enter any code after this syntax. It will not be executed.
If you selected the Maintain function, JavaScript, or VBScript button, this area is where you enter the code that defines your event handler.
WebFOCUS |