HTML General Purpose Procedures

Table 67. HTML General Purpose Procedures

Procedure

Description

html_br

Line break in a paragraph.

Syntax: html_br(number count, string attributes)

  • count = Number of <BR> tags

  • attributes = HTML attributes inside <BR>

Example:

print 'Here is some text' ()
do html_br(3,'')
print 'Here is some three lines down' ()

html_center

Start of centered text. (You can also use PRINT and specify CENTER in the code.)

Syntax: html_center(string attributes)

  • attributes = HTML attributes inside <CENTER>

Example:

do html_center('')
print 'Here is some text' ()
do html_center_end

html_center_ end

End of centered text.

Syntax: html_center_end

html_hr

Horizontal divider between sections of text.

Syntax: html_hr(string attributes)

  • attributes = HTML attributes inside <HR>

Example::

print 'Here is some text' ()
do html_hr('')
print 'And some more text' ()

html_img

Image. (You can also use PRINT-IMAGE; however, html_img allows you to define the full set of available HTML attributes.)

Syntax: html_img(string attributes)

  • attributes = HTML attributes inside <IMG>

Common attributes:src–URL of image (Example: src=/images/abc.gif) height–Image height in pixels (Example: height=200) width–Image width in pixels (Example: width=400)

Example:

do html_img('src="/images/stop.gif"')

html_nobr

Start of text that cannot be wrapped.

Syntax: html_nobr

Example:

do html_nobr('')
print 'Here's long text that should not wrap' ()
do html_nobr_end

html_nobr_end

End of text that cannot be wrapped.

Syntax: html_nobr_end

html_on

Turns on HTML procedures. Called at the start of Production Reporting programs.

Syntax: html_on

Example

do html_on

html_p

Start of a paragraph.

Syntax: html_p(string attributes)

  • attributes = HTML attributes inside <P>

Some common attributes:

align = left|right|center–Alignment of the paragraph.

Example:

do html_p('ALIGN=RIGHT')
print 'Right aligned text' (1,1)
do html_p_end 
print 'Normal text' (+1,1)

html_p_end

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

Syntax: html_p_end

html_set_body_attributes

Attributes inside <BODY>. Called at the start of Production Reporting programs.

Syntax: html_set_body_attributes(string attributes)

  • attributes = HTML attributes inside <BODY>

Common attributes:

background–Image displayed on the background of the Web page.

(Example: background=/images/logo.gif)

bgcolor=#rrggbb–Background color of the Web page.

(Example: bgcolor=#80FFF)

Example:

do html_set_body_attributes('BACKGROUND="/images/x.gif"')

html_set_head_tags

Tags between <HEAD> and </HEAD>. (Empty by default.) Called at the start of Production Reporting programs.

Syntax: html_set_head_tags(string attributes)

  • attributes = HTML attributes between <HEAD> and </HEAD>

Example:

do html_set_head_tags('<TITLE>My Report</TITLE>')