The attached subprogram NWHTMLX picks out a “template row” from an html text. The html text is expected in a dynamic variable. A template row is identified by any (self-defined) tag before and after the row.
For example, if the html looks like:
“nat-tag” is the identification tag, part2 is the template row picked out by NWHTMLX.
NWHTMLX offers functions to keep or delete the template row from the html text, to add new data into the template row, and to keep or delete the identification tag.
The program allows a strict separation of the program logic from the presentation layer. The program logic is handled by Natural (Natural Web Interface), the template html page can be generated by a Web authoring tool - no html knowledge is required. The “template row” is any part of the html text like a row or a cell of a table or a line in a drop-down list. All layout definitions like color and font of the template can be defined in the authoring tool. Natural provides the data and builds the full table using the template row in a modular conception.
The subprogram TABLE01 is an example calling NWHTMLX. The template html is ‘table01.html’.
Unzip the members and copy them into a Natural library (from Windows explorer into the Natural Studio). The html will go into the RES (resources) sub-library. When the Natural Web Interface is up and running, you can call TABLE01 from a browser to view the table.
Both Natural programs run under Natural 6.2 (Windows).
The subprogram NWHTMLX is described in the Developer Newsletter (June 2006) which gives also hints about the usage of the Natural Web technology.
NWHTMLX.zip (5.06 KB)