PROGRAMMING OVERVIEW AND USER INTERFACE


Examples: Events
1. This LotusScript event executes when a database opens. It opens a particular view depending on the value of the OrgUnit1 part of the user's name.
2. This LotusScript event executes before the Engineering view opens. If the OrgUnit1 part of the user's name is not "Engineering," the script displays a message and sets Continue to False so that the view does not open.
3. This LotusScript event executes when the user opens a document. The document goes into Edit mode even if the user doesn't open it that way, the ruler opens, and all sections expand.
4. This JavaScript button script alters the value of one of the fields on the associated form. In this example, a document can be assigned a priority rating from 1 to 10, with 1 being the highest priority. The document's priority rating is held in a field called "Priority" on the form. The button "Increase Priority" allows users to increase the priority without the need to edit the field directly. When the button is clicked, the Priority field's value is decreased by 1, assigning it a higher priority rating. The script will not allow a priority of less than 1 to be assigned.
5. This LotusScript event executes when the user enters the FullName field. The script fills in the FullName field by concatenating the FirstName field, a space, and the LastName field.
6. This JavaScript event executes when the focus moves away from the field. The script trims the white space from the start and end of the field and then tests whether the value is a valid zip code. If it is invalid, a message is displayed in the status bar and the focus is set back onto the field itself. Note that "trim" and "isValidZipCode" are user-defined functions that must be available from within the onBlur handler.
7. This LotusScript event executes when the user exits from the Age field. The script forces the user to enter a numeric value.
8. This LotusScript event executes when the user exits from a field. The script sends a mail message to Mary Chen.
See Also