Using the HTML Tag Element
The HTML Tag element enables you to easily insert custom HTML into your definition. One popular usage is to add <UL> and <LI> tags, which are commonly used by libraries like JQuery to build a unique UI.
Attributes
The HTML Tag element has the following attributes. Tokens are supported in all attribute values.
Attribute | Description |
---|---|
Html Tag Name | (Required) Specfies the HTML tag to be inserted, such as OL or LI or SPAN. Opening and closing tags will be inserted. |
Class | Specifies the CSS class to be used by the element. |
Condition | Specifies an expression that evaluates to a value of True or False. If True, then the HTML is generated, otherwise it's not. Expressions should be in JavaScript or intrinsic function syntax. |
Html Tag Text | Specifies the text content that will be included between the tags. For example, if Html Tag Name = SPAN and Html Tag Text = My dog has fleas, the resulting output is: <SPAN>My dog has fleas</SPAN>. |
ID | Specifies a unique identifier for this element. |
Security Right ID | When using Logi Security, specifies one or more Security Right IDs, separated by commas. Users with these Security Right IDs will be able to view the HTML tag, users without them will not. |
Here's a usage example:
As shown above, you can create hierarchies of nested HTML Tag elements, allowing us to create an un-ordered list (ol) with several list items (li). Notice the Html Attribute Params child element being used - it allows you to supply additional attributes (shown highlighted below) for an HTML tag.
The HTML generated by the example looks like this:
<ol>
<li title="my title" id="li_Coffee">Coffee</li>
<li id="li_Soda">Soda</li>
<li id="li_Water">Water</li>
</ol>
Also notice that the HTML is not wrapped in <SPAN> tags.
The Conditional Class element is available as a child of HTML Tag, allowing conditional setting of style classes.
The Event Handler element is available as a child of HTML Tag:
You can use the Event Handler as a child of HTML Tag to trigger actions related to HTML objects. In the example above, the HTML Tag element has been used to create two radio buttons that, unlike the Input Radio Buttons element, don't require a datalayer. When the buttons are clicked, the report is redisplayed. As in the case of a typical User Input element, the selected value is passed along as a Request variable that uses the HTM Attribute Params "name" and "value".