HtmlGenerator Class

script htmlgen.cpl
interface HtmlGenerator

HtmlGenerator Creation

The create function can be used:

    (create HtmlGenerator)

Once created, this module is accessed using its methods.

HtmlGenerator Methods

The HtmlGenerator object supports the following methods:

method name description
table make the body of an HTML <TABLE> statement
tableRow make an HTML table row statement (<TR>)
select make the body of an HTML <SELECT> statement to create a drop-down list
list make the body of an HTML list statement -- this converts the supplied data into <LI> statements
anchor make an HTML hyper-link statement <A>


table

Make the body of an HTML <TABLE> statement. The formatting for the table and the header (<TH>) statements are not created, since these are more easily set as standard HTML within the template.

The first argument is a list of rows -- each of which is passed to the tableRow method.

A second optional argument determines whether the supplied data contains HTML instructions already. If this argument is supplied and is non-(), then the data is taken as holding raw HTML. The default is to convert special characters into their HTML codes so that browsers present them normally on screen.

Arguments:

rowsList
isRaw optionalObject

Return type: String


tableRow

Make an HTML table row statement (<TR>).

The first argument is the data for a single row.

A second optional argument determines whether the supplied data contains HTML instructions already. If this argument is supplied and is non-(), then the data is taken as holding raw HTML. The default is to convert special characters into their HTML codes so that browsers present them normally on screen.

Arguments:

rowDataList
isRaw optionalObject

Return type: String


select

Make the body of an HTML <SELECT> statement to create a drop-down list. A sequence of <OPTION> statements is created from the supplied List.

Each element within the supplied list can be one of the following:

Arguments:

optionsList

Return type: String


list

Make the body of an HTML list -- ie. a sequence of <LI> statement. This converts the supplied List

Arguments:

optionsList

Return type: String


anchor

Make an HTML hyper-link statement <A>. The formData supplied is a an attribute/value list of pairs of Strings.

Arguments:

hrefString
descriptionString
formDataList

Return type: String


Contents Index Current topic: Carapace Hub Related topics: HTML templates