Jive HTML Processing

Jive processes a special HTML page containing embedded Jive commands. It takes HTML form input from the previous HTML page and passes it to the embedded Jive code. The embedded Jive code is replaced with HTML text output by the code. The constructed HTML page is the output from Jive.

Embedded Jive Code

Each instance of Jive code embedded in an HTML page is introduced with a left brace ({). If an actual left brace is needed in the HTML text, 2 braces are used. Following the left brace is a set of Jive commands terminated by a right brace. Within the braces, Jive provides robust programming capabilities: SQL commands use an Embedded SQL format, allowing references to external variables. The select command creates a set of variables to contain the result set.

The simplest Jive command is an expression. The value of the expression is output to the HTML page. For example,

Today, we have {invoice_count} invoices.
In the second example, if is used for more effective presentation,
Today, we have {if (invoice_count=0) 'no' else invoice_count} invoices.

External Jive Commands

Jive control commands can be used to control external HTML text. if can be used to conditionally include HTML text. For example,

{if search_count > 50}
<p>
Note: Over fifty items were found by the search criteria.  It is usually
best in these circumstances to narrow your search criteria.
{end}
The SQL select command processes a segment of HTML text for each row in the result set. For example, the following displays a bulletted list of items:

{input type}
<h3>Items:</h3>
<ul>
{select name from items where type = :type}
<li>{name}
{end}
</ul>

Copyright © 1996 FFE Software All Rights Reserved WorldWide