HTML Table Procedures

Table 72. HTML Table Procedures

Procedure

Description

html_caption

Start of a table caption.

Syntax: html_caption(string attributes)

  • attributes = HTML attributes inside <CAPTION>

html_caption_end

End of a table caption. Typically implied; however, can be defined for completeness.

Syntax: html_caption_end

html_table

Start of a table.

Syntax: html_table(string attributes)

  • attributes = HTML attributes inside <TABLE>

Common attributes:

borderDisplays a border around each table cell.

widthTable width in pixels.

colsNumber of table columns. (Example: COLS=4)

Example: Database records in a tabular format. html_caption_end, html_tr_end, html_td_end, and html_th_end are used for completeness; however, they are typically implied.

!start the table & display the column headings 
do html_table('border')
do html_caption('')
print 'Customer Records' (1,1)
do html_caption_end
do html_tr('')
do html_th('')
print 'Cust No' (+1,1)
do html_th_end
do html_th('')
print 'Name" (,10)
do html_th_end
do html_tr_end
! display each record
begin-select
do html_tr('')
do html_td('')
cust_num (1,1,6) edit 099999
do html_td_end
do html_td('')
name (1,10,25)
do html_td_end
do html_tr_end
next-listing skiplines=1 need=1
from customers
end-select
! end the table
do html_table_end

html_table_end

End of a table.

Syntax: html_table_end

html_td

Start of a new column in a table row. The text that follows displays within the column.

Syntax: html_td(string attributes)

  • attributes = HTML attributes inside <TD>

html_td_end

End of a column in a table. Typically implied; however, can be defined for completeness.

Syntax: html_td_end

html_th

Start of a new column header in a table row. The text that follows displays as the column header.

Syntax: html_th(string attributes)

  • attributes = HTML attributes inside <TH>

html_th_end

End of a column header in a table. Typically implied; however, can be defined for completeness.

Syntax: html_th_end

html_tr

Start of a new table row.

Syntax: html_tr(string attributes)

  • attributes = HTML attributes inside <TR>

html_tr_end

End of a table row. Typically implied; however, can be defined for completeness.

Syntax: html_tr_end