Creating, Modifying, Troubleshooting JavaScript for Notes and Web Clients

Design elements have events associated with them to which you can apply programming code; the code executes when the associated event happens. The types of events typically have been based on the client in which the events occur; onFocus is a JavaScript event that runs on a Web client, for example, and Entering is a LotusScript event that runs on a Notes client. New to Domino 6 are some dual client events that enable you to use different languages for coding two different clients in the same event. onFocus, for example, is the same type of event as Entering. Instead of coding in two separate events, the onFocus event allows coding LotusScript to run on Client (Notes) and JavaScript to run on Web. These dual client events are described in more detail in the next section.

Using JavaScript Events in Domino

The Dual Client Events table (Table 14.4) lists the dual events, the design elements in which they can be used, and the language that can be applied to each event.

Table 14.4. Dual Client Events
Event and ElementsNotesWeb

JSHeader— form, page, subform

JavaScript Common JavaScriptJavaScript Common JavaScript

onFocus— field

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

onBlur— field

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

onChange— field

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

onLoad— form, page

Formula

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

onUnload— form, page

Formula

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

onSubmit— form, page

Formula

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

onHelp— form, page

Formula

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript
Click event for Notes clients or OnClick event for Web clients— actions, hotspots, buttonsFormula

Simple action(s)

LotusScript

JavaScript

Common JavaScript
JavaScript Common JavaScript

In Table 14.4 there is a language listed as Common JavaScript, which is a new functionality in Domino 6. When JavaScript can be applied to the same event on both clients, select Common JavaScript. Common JavaScript executes in both clients and needs to be coded/maintained under only one client. Both clients are also synchronized; no matter in which client code changes occur, both clients are updated.

For the exam, be prepared to answer questions regarding new functionalities, such as Common JavaScript or Coding for Dual Clients and the events in which these functionalities can be applied.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.56.194