4 3 4 Link Type

Web Functions Wizard

4.3.4 Link Type

The Link Type defines what will happen when a menu item is selected. The Link Type options are identical to those available in DHTML menus. A menu item can be used to:

  • Act as a group heading or separator
    Select the No link option. This means that the menu item is not a hyperlink. For example, you can use this option to embed some text or an image into the menu.
  • Use a component
    Select the Component option. This option allows a LANSA component to be executed when the link is selected. The code within the component is the responsibility of the developer.
  • Link to a static page or another Web site
    Select the Static page option. The URL to access the page or the Web site is specified in the field. For example, you might enter http://www.lansa.com to access the LANSA Web site.

    You can choose to launch the link in a new window by selecting the Start in New Window option.
  • Link to another LANSA function
    Select the LANSA function option. The name of the LANSA process and function are specified in the Process and Function fields respectively. The current partition is assumed when invoking the function.

    You can choose to use the HandleEvent JavaScript function to reuse the same LANSA job at the Application Server by selecting the Reuse Job option. If this option is not selected, the menu item uses an anchor block to link to the LANSA function. In other words, it always runs the LANSA function as a new LANSA job at the Application Server.

    You can choose to launch the link in a new window by selecting the Start in New Window option.

    The Reuse Job and Start in New Window options are mutually exclusive.

    The Optional JavaScript option allows extra parameters to be passed before a LANSA function is called. If it is left blank, it is assumed that no parameters are passed. An example of an optional JavaScript is:

       document.LANSA.ANEXTACTION.value='ADD'

   This will generate the following syntax for the JavaScript:

When adding optional JavaScript, it is your responsibility to make sure that the syntax is correct. The syntax is not validated.

If you choose to link to a non-*WEBEVENT function (i.e. procedural function) from a *WEBEVENT function, you should not select the Reuse Job option. You should launch the link in a new window by selecting the Start in New Window option.