PROGRAMMING DOMINO FOR WEB APPLICATIONS
The following Domino objects have JavaScript event handlers: form, subform, page, field, action, button, and action hotspot. You can attach code to these event handlers in the Programmer's pane. The code executes when the event occurs in a browser that supports the event, and, limitedly, in the Notes client.
Table of JavaScript events
The following table lists the JavaScript event handlers in Lotus Domino Designer. "Browser only" means that the event handler only works in browsers that support it. "Browser and Notes" means that the event handler works in browsers that support it and the Notes client.
Restrict code that must work in both a browser and the Notes client to the following events:
JSHeader is a special event handler that loads code such as functions and global variable declarations that all the events in the object can access. This code goes under the <HEAD> tag in Domino-generated HTML.
onSubmit event
The onSubmit event occurs in a browser and the Notes client when the FileSave @command executes. In a browser, you can return false from the onSubmit event to abort the save operation.
Enabling JavaScript in the Notes client
To run JavaScript in a Notes client, the user must select "Enable JavaScript" under "Additional Options" after choosing File - Preferences - User Preferences. To expand or limit security, the user must select "Using JavaScript" under "What Others Do" after choosing File - Security - User Security.
Example See Also