Web Utilities

*WEB/UTIL

HTML Coding Utility

Description

The Web Server's *web/util program may be called to simplify your coding when you build your HTML pages in PxPlus applications.

The *web/util program contains miscellaneous routines to put various HTML codes into the %print_fn data channel for you. This is a called program with various entry points and various ENTER argument lists.

The table below contains a list of formats for the various entry points with arguments and descriptions of the codes that are added to %print_fn.

To Add to $print_fn

*web/util CALL EntryPoints

1. Begin HTML

CALL "*web/util;BEGIN_HTML",title$

Adds HTML code starting with the <html><header> tag and going through to the </header><body> tags. Adds title$ value as a page title.

2. Closing Sequence

CALL "*web/util;END_HTML"

Adds the closing sequences </body></html>. Auto-closes any of the following:

Links set by BEGIN_LINK
Paragraphs set by NEW_PARA
Forms set by BEGIN_FORM

3. Begin Link

CALL "*web/util;BEGIN_LINK", url$

Puts in a link and anchor tag for the given url$.

4. End Link

CALL "*web/util;END_LINK"

Adds closing the anchor tag.

5. Begin Font

CALL "*web/util;BEGIN_FONT", name$, pt_size[,bold]

Adds the begin_new_font tag for your given font name and point size. Bold is a Boolean value: 0 if omitted; 1 if included.

6. End Font

CALL "*web/util;END_FONT"

Adds the closing tags to end the font tag created by BEGIN_FONT.

7. Begin Form

CALL "*web/util;BEGIN_FORM", form_name$, url$

Closes a previous paragraph and form (as necessary) before creating a new form. Creates a new form tag with the given form name, links by POST to the given url$.

8. End Form

CALL "*web/util;END_FORM"

Adds the closing tags for paragraph and form (as necessary).

9. Input Field

CALL "*web/util;INPUT_FIELD", field_name$, size

Creates an input field ("TEXT" type) with field_name$ and width.

10. Input Required

CALL "*web/util;INPUT_REQD_FIELD", field_name$, size

Same as INPUT_FIELD but puts in validation code for field_name$!=null.

11. Input Area

CALL "*web/util;INPUT_AREA", field_name$, cols, lines

Creates an input field ("TEXTAREA" multiline type) with the given number of columns and rows.

12. Submit Button

CALL "*web/util;SUBMIT_BUTTON", text$

Creates a submit_action button for a form. The text$ is the button's description.

13. Reset Button

CALL "*web/util;RESET_BUTTON", text$

Create a reset_action button for a form. The text$ is the button's description.

14. New Paragraph

CALL "*web/util;NEW_PARA"

Creates a new paragraph tag (and closes a pre-existing one as necessary).

15. Program List

CALL "*web/util;LIST"

The utility lists itself to the %print_fn channel.

Format

Basic Call:

CALL "*web/util;entrypoint", required_arguments

Where:

 

entrypoint

Entry point (line label) where execution in the *web/util subprogram starts for the given routine.

 

required_arguments

String or numeric variable name. For each entry point of the utility, there are different argument lists. Refer to above table.