7.5 <RDML BUTTON>

Syntax:

<RDML BUTTON=”<button>”>

</RDML>

Description:

These tags are used to check the status of the specified button in the LANSA Web function. If the particular button is not enabled in the function, the lines encapsulated by these tags are ignored by LANSA Web. Otherwise, the lines are processed accordingly.

The <button> value can be one of the following 7.22 Reserved Words:

&EXIT

&CANCEL

&ADD

&DELETE

&CHANGE

&PROMPT

&USER1

&USER2

&USER3

&USER4

&USER5

There is a special value, &WEBEVENT, which is used in conjunction with WEBEVENT functions. In this case, if the function is a WEBEVENT function, the lines encapsulated by these tags are ignored.

 

Consider the following example:

<RDML BUTTON="&USER1">

   <input type="image" src="/IMAGES/USER1.GIF" name="&USER1" />

   <b>Click this button to search</b>

</RDML>

If the Web function has a user key1 specified in the DISPLAY or REQUEST command, (e.g. REQUEST FIELDS(#GROUP1) DESIGN(*DOWN) USER_KEYS((01 ‘Search’)  ), then the statements within the start and end tags are executed. In this case, an image will be displayed for the button along with some text.

The <RDML BUTTON> tag should not be confused with the <RDML MERGE=&BUTTONS> tag. The merge tag is used to embed the active buttons into the HTML page whereas the <RDML BUTTON> tag is used to control whether or not a block of HTML lines will be executed.