8 1 1 Anchor std_anchor

LANSA WAM

8.1.1 Anchor (std_anchor)

 

QuickStart - Anchor

Properties - Anchor

The anchor weblet provides a hyperlink (or anchor) control. It broadly corresponds to the <a> (anchor) HTML element that designates the destination of a hypertext link.

  • The anchor weblet can display an image and/or text to represent the link and can specify a destination that the WAM should navigate to when the link is activated.
  • The image or text can be static (specified as literals in the weblet properties) or can be determined by nominated fields, system variables or multilingual variables.
  • The destination can be a url (such as http::/lansa//www.yourcompany.com/) or you can specify a WAM and webroutine to be executed and optionally identify a field whose value should be passed to the webroutine.

The anchor weblet looks like this (the department codes):

The anchor weblet is frequently used with a field or a column in a list to provide a quick and easy way to both select an item and initiate an action concerning that item. In the example above, the department codes have been made into anchors. When the user clicks a department code another webroutine is invoked that displays details for the corresponding department. The currentrowhfield and currentrownumval properties specify that the corresponding department code is passed to that webroutine.