8.3.1 Image File Graphic Variables

An Image File variable allows you to associate an image with the variable. This variable is useful for displaying images on your applications. You can dynamically change the image associated with the variable, without having to edit the HTML or recompile the LANSA function.

If the graphic variable is an image file variable, the image associated with the variable must be stored in the Image Location as configured in LANSA Web using the LANSA Web Administrator.

The advantage of using graphic variables is that you can dynamically change the image associated with the variable, without having to edit the HTML or recompile the LANSA Web function. For example, you can customize settings like the company logo. Instead of embedding the company logo into every HTML page, you can define a graphic variable for the company logo. If the company logo is changed, the change needs only be done once, by redefining the graphic variable.

In the example below, the <RDML MERGE> tag is used to embed an image defined by the *LW3IMGHOME variable, which is the image used for the Home button.

<td width="5%"></td>

<td>

   <input type="image" name="&amp;HOME" src="<RDML MERGE="*LW3IMGHOME">" />

   <h5 align="center">Home</h5>

</td>

LANSA Web allows you to customize the background color or the background image. You would associate the background color with the *LW3CLNTCOLOR graphic variable, and the background image with the *LW3CLNTBKGND graphic variable.

Note: If both graphic variables are defined in your system, the background image would take precedence.

The Web Function Editor is used to define graphic variables.

 

WEB006 - Graphic Variables