KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Another Technique for Hiding or showing a button on a Web page
PRODUCT: 4D | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: August 24, 2001

Here is another way to hide or display a button on an HTML page. Instead of building the HTML code inside of a 4D method, this technique uses the <!--4DIF--> and <!--4DENDIF--> tags.

Web Services, 4D HTML Tags
https://ftp.4d.com/aci_Technical_notes/ACIDOC/CMU/CMU02070.HTM

<!--4DIF (fIncludeButton=True)-->
<input type="submit" name="delete" value="Delete">
<!--4DENDIF-->

The condition to be tested (inside the parentheses) can be any valid 4D expression that returns a Boolean value. In this case we are checking the Boolean process variable "fIncludeButton" to see if it is set to True.

Compare this technique with the one I gave previously:

Hiding or showing a button on a Web page using <!--4DHTMLVAR-->
https://www.4d.com/support/tips01-684.html