The configuration of the sample Custom Tool in the WebOffice Sample Project effects that a user defined extent and the content of a field of a layer inside this extent are passed to website integrated in an IFrame in WebOffice. Therefore a custom HTML page and an advanced Custom Tool for the dynamic input are used.
When using the pass mode Javascript no JSP file for passing the parameters is needed. The important fields are the URL of the external page and the Javascript function inside this page that processes the passed parameters.

Custom Tool configuration
The configuration of the dynamic selection method and the of layer and field to pass are done in the advanced Custom Tool dialog. No parameter names have to be specified when working with Javascript as pass mode. The parameters will be passed as an array containing the field values and a two dimensional array containing the coordinates of the vertices defining the selection area.

Advanced Custom Tool configuration
The target HTML page has a <script> section of language javascript. Inside this section a function named like the Javascript function configured in the Custom Tool configuration processes the passed parameters.

JavaScript function in Custom Tool HTML page
The output of the function is a string with the formatted content of the parameters that is passed to a <div> of the HTML page.

Custom Tool with output in WebOffice 10 R3 HTML client