Working with Form-Level Events

In Release 3, the only way to program Notes was through the Formula language, and a limited number of events could be programmed. An editable field had three events that could be programmed: Default, Input Translation, and Input Validation. No form-level events were available, except for Window Title. With the addition of LotusScript, an object-oriented programming language in Release 4, many more events opened up to the developer. Similarly, in R5, JavaScript events were added to fields and forms. In Notes and Domino 6, Common JavaScript was added. Common JavaScript runs on Web and Notes clients .

Form events appear in the Objects tab of the Design pane. The number of form-level events has grown numerous with the addition of the JavaScript. Table 5.5 lists form events for the Formula language, LotusScript, and JavaScript. In addition to the events listed in Table 5.5, there are four LotusScript global events: (Options), (Declarations), Initialize, and Terminate. You can find a lengthy document in the Designer Help database titled "Event Sequencing" that lists the events for databases, forms, fields, views, and their timing.

Table 5.5. Programmable Form Events

Formula Language LotusScript JavaScript
Window Title Options JS Header
HTML Head Content Declarations onHelp
HTML Body Attributes Entering onLoad
WebQueryOpen Exiting onUnload
WebQuerySave Initialize onClick
Target Frame Terminate onDblClick
  Options OnKeyDown
  Declarations onKeyPress
  QueryOpen onKeyUp
  PostOpen onMouseDown
  QueryModeChange onMouseMove
  PostModeChange onMouseOut
  QueryRecalc onMouseOver
  PostRecalc onMouseUp
  QuerySave onSubmit
  PostSave  
  QuerySend  
  PostSend  
  QueryClose  
  Initialize  
  Terminate  

You can find additional information about programming events in Part III, "Programming Domino Applications."

Категории