| script | htmlgen.cpl |
|---|---|
| interface | HtmlGenerator |
The create function can be used:
(create HtmlGenerator)
Once created, this module is accessed using its 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:
| rows | List |
| isRaw optional | Object |
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:
| rowData | List |
| isRaw optional | Object |
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:
(), then the
HTML option is selected.
This is useful when multiple selections are allowed within the drop-down list.
Arguments:
| options | List |
Return type: String
list
Make the body of an HTML list -- ie. a sequence of <LI> statement. This converts the supplied List
Arguments:
| options | List |
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:
| href | String |
| description | String |
| formData | List |
Return type: String
| Contents | Index | Current topic: Carapace Hub | Related topics: HTML templates |