Event Handling in VBScript
An event occurs as a result of an action, initiated either by a user or as an inherent part of the operation of the browser. There are three distinct ways in which VBScript can handle events. It appears that VBScript handles events in a more sophisticated manner than JavaScript.
- In a SCRIPT tag - place EVENT and FOR attributes into a SCRIPT tag. This tells the browser to skip this VBScript code section and execute on an event
- Inline - an inline event handler is the same as an onClick event handler in JavaScript where an HTML tag can contain the onClick event handler
- Subroutines - events can also be handled with subroutines. Much the same as the onClick event handler in JavaScript