> ## Using JavaScript to Write an Event Handler

> BIRT scripting is based on the Mozilla Rhino implementation of JavaScript, also called ECMAScript. Rhino implements ECMAScript version 1.5 as described in the ECMA standard ECMA-262 version 3. The complete specification for Rhino is located at:

> http://www.ecma-international.org/publications/standards
> /Ecma-262.htm

> #### How to use BIRT Report Designer to enter a JavaScript event handler

> 1 | In Outline, select the report element, data source, or data set for which to write an event handler.

> 2 | Choose the Script tab.

> 3 | Select an event handler from the drop-down list of methods.

> 4 | Type the event handler code in the script editor.

> Figure 22-1 shows a line of code in the onPrepare( ) method of a List element.

> Figure 22-1 Code entry for the onPrepare( ) method

(c) Copyright Actuate Corporation 2013