bar<N>button<N> parameter

This parameter specifies custom buttons to insert into any of the top, bottom, annotations, or context-sensitive toolbars. The custom buttons initiate calls to JavaScript methods that are embedded in your HTML page.

Buttons are added to the left side of the specified toolbar.

The parameter value is a comma-delimited sequence of strings with the following values:

script<N>()
This script is the name of any JavaScript function that you want IBM Daeja ViewONE to call when the user clicks the button. You can include one parameter in this script name. For example, script1(1234). The script name must be in lowercase.
help1
This parameter is the help text that is used in the button tooltip and status bar text.
disabledN.jpg
This parameter is the file name for the image that is seen when the button is disabled. This file must exist in the location indicated by your codebase parameter and the image must measure 22 by 19 pixels.
true / false
When this parameter is set to true, the button is enabled all the time. When it is set to false, the button is enabled only when a document is open.
evalscriptN()
Important: This parameter allows for an optional extra script to be used to evaluate the button state.

The evalscriptN() script is the name of any additional JavaScript function that you want IBM Daeja ViewONE to call when the user clicks the button. You can include one parameter in this script name, for example, script1(1234). The script name must be in lowercase.

The function returns a bitmasked value that is used control the display state of the button itself. The following table contains the values.
Return Value Visible Depressed Enabled
0 No No No
1 Yes No No
2 No Yes No
3 Yes Yes No
4 No No Yes
5 Yes No Yes
6 No Yes Yes
7 Yes Yes Yes
Important:
  • Unlike the rest of the comma limited sequence (all of which is mandatory), this last function is optional and can be left off entirely if you prefer.
  • Button images can be JPEGs or GIFs and can have transparent areas. Set any area of the image that you want to be the background to transparent so that IBM Daeja ViewONE can display them with a matching background to the rest of the viewer.

Sample syntax

<PARAM NAME="bar1button1" value="script1(), help1, enabled1.jpg, disabled1.jpg, true">
<PARAM NAME="bar2button1" value="script2(), help2, enabled2.jpg, disabled2.jpg, true">
<PARAM NAME="bar3button1" value="script1(), help1, enabled1.jpg, disabled1.jpg, true, eval1()">
<PARAM NAME="bar4button1" value="script2(), help2, enabled2.jpg, disabled2.jpg, true, eval2()">