Wednesday, February 18, 2009

Hyperlinks

n order to make the results of queries more flexible the application offers the possibility of hyperlinks for selected fields. This works both for layer fields and fields out of a joined DB table. The hyperlinks are defined in the METADATA tag for every layer like the following example:

"RESULT_HYPERLINK" "FIELD1||Link on Detail, FIELD2"

In between the quotes separate the hyperlink fields with commas. If you don't want to have the field value being displayed as the hyperlink text, you can add an ALIAS name after the field name separated with a double pipe sign like set for FIELD1 in the example above.

The hyperlink definition has its corresponding JavaScript function openHyperlink() (in the custom.js file) that is added to every link as the action. The function receives layer, field name, and field value. For every layer and field you can define how to process this information, e.g. include them in other JavaScript functions.

2 comments:

  1. if I have multiple hyperlinks like in this case how should the custom.js file be modified?

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Followers