5.1.2 Setting the onClick Range

For a Table, the onClick range specifies the range of cells for which the onClick script is active. To set the onClick range for an element, right-click the element, and select 'Script' from the context menu. In the Script Editor, select the onClick Range tab. The options for the onClick range are as follows:

All rows

All columns

Specific column

Header row

Trailer row

Header column

Trailer column

It is very common to pass the value in the clicked cell as a parameter in the hyperlink. For example, the user clicks a state name in the 'State' column, and you want to pass this clicked value to the drill-down report. To obtain the clicked value, first find the row and column indices of the cell by using the event.getRow() and event.getColumn() functions.

var rowIx = event.getRow();

var colIx = event.getColumn();

Then use these indices with the Table's table property to obtain the data value.

showReplet("customers",[["state",table[rowIx][colIx]]]);

<< 5.1.1 Using the onClick Handler © 1996-2013 InetSoft Technology Corporation (v11.4) 5.2 onInit Handler >>