8.3.3 Text Graphic Variables

This type of variable allows you to associate a string of text with a variable. You can use the text graphic variables anywhere that you want a variable in your HTML. The variable can hold a string of characters up to 255 characters long. The text variable could contain a word, a number, a phrase, or even a complete HTML string. The text associated with such a variable can be changed dynamically without having to edit the HTML or recompiling the function.

For example, you could create a graphic variable called *LW3FONTFACE which would store the name of the font you wish to use in your HTML. You might give it a value of “COURIER”. A graphic variable called *LW3FONTSIZE could be used to control the font size. You might give it a value of “12”. These variables could be used as follows:

<font face="<RDML MERGE="*LW3FONTFACE">" size="<RDML MERGE="*LW3FONTSIZE">"> 

You could also create a variable called *LW3COPYRIGHT. This variable could be used to display the copyright information on your pages. For example, the variable might be set to the following HTML string:

"<strong> All images and text are copyrighted by XYZ Inc. 2000</strong>"

The power of graphic variables is the ability to change these values dynamically.

Imagine that you have multiple Web sites around the world. These sites are mirror sites so your applications are identical. If you wanted to indicate to the user which site they were actually using, you could create a graphic variable called *LW3WEBSITE. The variable would have a different value on each machine. It might have a value of “CANADA” or “AUSTRALIA”. The HTML would be identical. It would simply read:

<b>You are accessing <RDML MERGE="*LW3WEBSITE"> </b>

On the Canadian mirror site, it would appear as:

<b>You are accessing CANADA </b>

The Web Function Editor is used to define graphic variables.

 

WEB006 - Graphic Variables