Hyperlink

 

Overview

Hyperlinks are similar to buttons in the way they function. Both are clickable elements that can return control to a program or initiate client-side scripts.

Validation (Rich UI Only)

bypass validation - Setting this property, you can allow the link to not trigger validation and clear the data entered. Most often this is used with an exit or cancel button, but can be applied to a hyperlink. When bypass validation is set to 'true', all validation is bypassed and data from the screen is not sent to the application.

Field Binding Dialog (Rich UI Only)

Please visit the Field Binding page.

value - This property is used to set the text the hyperlink displays. This property may be bound to an RPG field. (Rich UI Only)

response - The response property sets a response indicator to return to the program when the hyperlink is clicked. (Rich UI Only)

shortcut key - This property specifies a keyboard shortcut to trigger the hyperlink click and submit a response to the server. If the 'shortcut key' property is used this will also allow the program to receive a key code in INFDS data structure. (Rich UI Only)

onclick - The onclick property is used when you wish to initiate a client-side script when the hyperlink is clicked.

hyperlink reference -This specifies an href attribute for the hyperlink. This can be used as an alternative to the response property or the onclick event property.

The hyperlink reference properties can also be set for links to do things like 'mailto:' or 'click to call':

     

In this example, setting the hyperlink reference will open your native email client to send an email to the specified 'mailto:' recipient. This can also be applied in mobile applications with the 'click to call' example where when the hyperlink is clicked the phone number will be sent to the devices dialer to place a call to the specified number.

Another use for the hyperlink reference property is to open a new URL. This is typically used in conjunction with the target property to open the URL in a new window.

To do this, simply place a valid URL in the hyperlink reference property and set the target if you wish to open the link somewhere other than the default.

In this example the URL would open in a new window or tab.

target - The target property specifies where to open the hyperlink reference. One way to use the target property is to open a new URL in a pop-up window.

The following targets can be specified:

  • _parent - Opens the hyperlink reference in the parent frame.

  • _blank - Opens the hyperlink reference in a new window or tab.

  • _top - Opens the hyperlink reference in the full body of the window.

  • _self - Opens the hyperlink reference in the same frame as it was clicked (this is the default).