{websage.i SET SERVICE serviceName} {websage.i SET STYLE styleName} /* optional, if not using the primary style */ {websage.i SET FONT fontName} /* optional, if not using the primary font */ {websge.i SET FUNCTION functionName} X = {websage.i VALIDATE_LOGIN_ID} /* and test the results and handle it */ .....
In order to do anything useful, you are eventually going to need to write text out to the client/browser. The identifier to support this is {&WRITE}. {&WRITE} preceeds a list of expressions that will be sent to the client browser. Each expression is seperated from the next by a space. You can have as many expressions as you want per line, though the total number of characters on a line can't exceed your -inp limit (usually 8192 characters).
You should break the line up with physical line breaks as well as line breaks in the actual written text/HTML. While a browser will easily handle a single continuous line of nearly any length and properly format it, it's very difficult from a debugging standpoint to use the "View Source" feature of most browsers if the source is on one big line. The {&SKIP} synbol can be inserted as logical places in the list of written expressions and has no affect on the final, formatted HTML - just the source.
A sample of writting HTML is:
{&WRITE} {html.i PAGE_HEADER "'My Page'"} {&SKIP} {html.i BODY_START} {&SKIP} {html.i PARA_START} {&SKIP} {html.i BOLD "'Here I am!'"} {&SKIP} {html.i BODY_END} {&SKIP} {html.i PAGE_FOOTER} {&SKIP}.An older form of {&WRITE} is {&OUT}. {&OUT} is deprecated and has performance problems. All {&OUT} uses should be changed to {&WRITE}. You'll note that {&OUT} lines use a plain SKIP to break up lines and when converting to {&WRITE}, you'll need to convert all SKIP's to {&SKIP}.
(returns LOGICAL) INCLUDE_HTML
HTMLFile
Causes the supplied HTML file to be injected into the current web stream output.
If the file is found, then the contents of that file (which must be a text/HTML
file) are read and issued to the web browser and TRUE is returned. If the file
cannot be accessed, FALSE is returned.
(returns LOGICAL) INCLUDE_TOKENIZED_HTML
HTMLFile
Causes the supplied HTML file to be injected into the current web stream output
after any tokens in the file have been replaced with matching token values.
If the file is found, then the contents of that file (which must be a text/HTML
file) are read, tokens are substituted and then issued to the web browser and
TRUE is returned. If the file cannot be accessed, FALSE is returned. Note that
if a token exists but there is no value for the token, the token is simply removed
from the file before being sent to the browser. See the Token Processing section
for more information on setting and using tokens.
(returns LOGICAL) INCLUDE_CUSTOM_HTML
HTMLFile
Causes the supplied HTML file to be injected into the current web stream output.
The passed file is first checked to see if it is in the DISTRICT_PATH. If not,
then the file is checked to see if it is in the HTML_PATH. If in neither path,
the file is opened with the unmodified file name being passed. If the file is
found, then the contents of that file (which must be a text/HTML file) are read
and issued to the web browser and TRUE is returned. If the file cannot be accessed,
FALSE is returned.
(returns LOGICAL) INCLUDE_CUSTOM_TOKENIZED_HTML
HTMLFile
Causes the supplied HTML file to be injected into the current web stream output
after any tokens in the file have been replaced with the matching token values.
The passed file is first checked to see if it is in the DISTRICT_PATH. If not,
then the file is checked to see if it is in the HTML_PATH. If in neither path,
the file is opened with the unmodified file name being passed. If the file is
found, then the contents of that file (which must be a text/HTML file) are read,
tokens are substituted and then issued to the web browser and TRUE is returned.
If the file cannot be accessed, FALSE is returned. Note that if a token exists
but there is no value for the token, the token is simply removed from the file
before being sent to the browser. See the Token Processing section for more
information on setting and using tokens.
HTML Tags are based on the current style (as last defined with SET STYLE). As such, if you find yourself overridding/suplementing tags often, consider instead creating a new style to use. Changing styles as needed is a very cheap operation. By default, the primary style for a servie is loaded when the service is set.
CONTENT_TYPE_HTML
Returns a string that needs to be sent out to the browser before any other HTML
commands to instruct the browser that HTML is being sent (vs some other file
form). This is normally NOT used as the PAGE_HEADER function provides the most
common usage automatically.
HTML_START [optparm]
Returns a <HTML> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
This tag is not normally needed as it's included in the prefered PAGE_HEADER
tag.
HTML_END [optparm]
Returns a </HTML> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
This tag is not normally needed as it's included in the prefered PAGE_FOOTER
tag.
HEAD_START [optparm]
Returns a <HEAD> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
This tag is not normally needed as it's included in the prefered PAGE_HEADER
tag.
HEAD_END [optparm]
Returns a </HEAD> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
This tag is not normally needed as it's included in the prefered PAGE_FOOTER
tag.
NO_CACHE_TAGS [optparm]
Returns a set of tags that should come after the HEAD_START and before the HEAD_END
and will cause the page to not be cached by most browsers. This means that if
the user revisits the page later, instead of showing an old page, a fresh one
should be fetched from the server.
You should only use this on pages that, for some reason, are likely to become "stale" over time. It puts a larger load on the server and not all browsers support it anyway. It's most often used in login pages.
TITLE_START [optparm]
Returns a <TITLE> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
This tag is not normally needed as it's included in the prefered PAGE_HEADER
tag.
TITLE_END [optparm]
Returns a </TITLE> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets). This tag is not normally needed as it's included in the prefered
PAGE_FOOTER tag.
BODY_START [optparm]
Returns a <BODY> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
BODY_END [optparm]
Returns a </BODY> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
You must include a BODY_END before the PAGE_FOOTER tag (if you have a BODY_START).
PAGE_HEADER title
Returns the page header for a standard HTML page. It include the content type,
html start tag, header start tag, title tag, the supplied title text, the closing
title tag and the closing header tag. Unless you have a rally good reason, you
should always use this tag instead of the individual tags that make this up.
As time goes forward, any changes needed to make our pages compatible with the
latest browsers will be handled via this tag.
PAGE_FOOTER
Returns the html end tag, along with possible some other compatiblity tag. You
should have correctly ended any open table, sections, forms and the body before
using this tag. You should always use this tag instead of using the individual
tags that make this up.
Forms allow the user to type information into fields and when the form is submitted, your WebSage program can extract what the user typed in. Generally, each tag that allows a user to enter data has a name. You use the GET WEB_FIELD function later to extract that value. In the case of MIME postings from the user (usually used by the FILE_FIELD), you also use the GET MIME_ELEMENT_INFO.
SERVICE_IMAGE imageFile [optparm]
Returns a <IMG%gt; tag as defined for the current style. imageFile is automatically
included as the source for the image and the file is expected to exist in the
IMAGE_PATH directory. If 'optparm' is passed, it's included in the body of the
HTML tag (i.e. within the angle brackets).
DISTRICT_IMAGE imageFile [optparm]
Returns a <IMG%gt; tag as defined for the current style. imageFile is automatically
included as the source for the image and the file is expected to exist in the
DISTRICT_PATH directory. If 'optparm' is passed, it's included in the body of
the HTML tag (i.e. within the angle brackets).
CUSTOM_IMAGE imageFile [optparm]
Returns a <IMG%gt; tag as defined for the current style. imageFile is automatically
included as the source for the image and the file is expected to exist in either
the DISTRICT_PATH directory or the IMAGE_PATH directory. DISTRICT_PATH is tried
first, then the IMAGE_PATH. If the file is found in neither directory, the unmodified
file name is used. If 'optparm' is passed, it's included in the body of the
HTML tag (i.e. within the angle brackets).
URL_IMAGE imageURL [optparm]
Returns a <IMG%gt; tag as defined for the current style. imageURL is automatically
included as the source for the image and can be a relative URL or an absolute
URL. No processing is done to what is passed here - it's directly included,
verbatim, in the source specification of the image. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
TABLE_START [optparm]
Returns a <TABLE> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
TABLE_END [optparm]
Returns a </TABLE> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets). You must include a TABLE_END for every TABLE_START you include.
TABLE_ROW_START [optparm]
Returns a <TR> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
TABLE_ROW_END [optparm]
Returns a </TR> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
You must include a TABLE_END for every TABLE_START you include.
TABLE_HEADER_START [optparm]
Returns a <TH> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
TABLE_HEADER_END [optparm]
Returns a </TH> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
You must include a TABLE_HEADER_END for every TABLE_HEADER_START you include.
TABLE_HEADER headertext [optparm]
Returns a <TH> and </TH> pair with the passed headertext between
them. This is a simple form that allows headers to be specified easily.
TABLE_ITEM_START [optparm]
Returns a <TD> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
TABLE_ITEM_END [optparm]
Returns a </TD> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
You must include a TABLE_ITEM_END for every TABLE_ITEM_START you include.
TABLE_ITEM itemtext [optparm]
Returns a <TD> and </TD> pair with the passed itemtext between them.
This is a simple form that allows items to be specified easily.
LINK_START destination [optparm]
Returns a <A HREF=> tag as defined for the current style. destination
is the URL to be embeded in the link as the destination of that link. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets).
PROG_LINK_START destination
parameters [optparm]
Returns a <A HREF=> tag as defined for the current style. destination
is the name of a WebSage program to be invoked when the link is selected. Note
that the program path is prefixed to this automatically, so you should not include
it again. parameters are optional parameters (name/value pairs) to be passed
to the program. WWW will automatically attach a unique identifier to the parameters
(to prevent browser caching) and will incldue the current login session ID (if
any). Name/value pairs are passed along as "name=value". If the "value" portion
includes spaces or ampersands, plus characters or question marks, you must first
encode it for HTML transmission using the HTML_ENCODE option. If you have more
than one name/value pair, use a ampersand to seperate them (i.e. name=bob&order=up).
The parameter option is required, but can be an empty string. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
HTML_LINK_START destination
[optparm]
Returns a <A HREF=> tag as defined for the current style. destination
is the name of a HTML page from the services static HTML directory. The actual
directory path will be prefixed to the passed destination, so it shouldn't be
included in what you pass. If 'optparm' is passed, it's included in the body
of the HTML tag (i.e. within the angle brackets).
DISTRICT_HTML_LINK_START destination
[optparm]
Returns a <A HREF=> tag as defined for the current style. destination
is the name of a HTML page from the services district specfic directory. The
actual directory path will be prefixed to the passed destination, so it shouldn't
be included in what you pass. If 'optparm' is passed, it's included in the body
of the HTML tag (i.e. within the angle brackets).
LINK_END [optparm]
Returns a </A> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
You must include a LINK_END for every LINK_START (or similar tag) you include.
ANCHOR name [optparm]
Returns a <A NAME=> tag as defined for the current style. Anchors are
usually used for destination points within an HTML document. name is the name
of the anchor and in most cases, should start with a hash mark character (#).If
'optparm' is passed, it's included in the body of the HTML tag (i.e. within
the angle brackets).
LINK destination markedtext
[optparm]
Returns a LINK_START and LINK_END pair with the passed markedtext between them.
This allows simple links to be created easily. If 'optparm' is passed, it's
included in the body of the HTML tag (i.e. within the angle brackets).
PROG_LINK destination parameter
markedtext [optparm]
Returns a PROG_LINK_START and LINK_END pair with the passed markedtext between
them. This allows simple program links to be created easily. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
HTML_LINK destination markedtext
[optparm]
Returns a HTML_LINK_START and LINK_END pair with the passed markedtext between
them. This allows simple static HTML links to be created easily. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets).
DISTRICT_HTML_LINK destination
markedtext [optparm]
Returns a DISTRICT_HTML_LINK_START and LINK_END pair with the passed markedtext
between them. This allows simple district specific static HTML links to be created
easily. If 'optparm' is passed, it's included in the body of the HTML tag (i.e.
within the angle brackets).
FRAMESET_START [optparm]
Returns a <frameset> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets). Note that a FRAMESET_START and FRAMESET_END must not occur between
BODY_START and BODY_END tags or it may be ignored.
FRAMESET_END [optparm] Returns
Returns a </frameset> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets). Note that a FRAMESET_START and FRAMESET_END must not occur between
BODY_START and BODY_END tags or it may be ignored.
FRAME name content [optparm]
Returns a <frame> tag as defined for the current style. name is the name
of the frame (mostly used for links) and content is the URL of the HTML page
to load into the frame. If 'optparm' is passed, it's included in the body of
the HTML tag (i.e. within the angle brackets). Note that a FRAME or PROG_FRAME
must occur between FRAMESET_START and FRAMESET_END tags or it may be ignored.
PROG_FRAME_START name content
parm [optparm]
Returns a <frame> tag as defined for the current style. name is the name
of the frame (mostly used for links) and content is a WebSage program that will
be executed to fill the frames body. Note that the path to WebSage programs
will be automatically prefixed to the passed program name, so you should not
include it. parm is any name/value info that should be passed along to the program.
See PROG_LINK_START for more information on this. If 'optparm' is passed, it's
included in the body of the HTML tag (i.e. within the angle brackets). Note
that a FRAME OR PROG_FRAME must occur between FRAMESET_START and FRAMESET_END
tags or it may be ignored.
NOFRAMES_START [optparm]
Returns a <noframes> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets). NOFRAME_START is meant to show messages to users who attempt to work
with a frames incapable browser. NOFRAMES_START and NOFRAMES_END must come after
the last FRAMESET_START/FRAMESET_END tags.
NOFRAMES_END [optparm]
Returns a </noframes> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets). NOFRAME_START is meant to show messages to users who attempt to work
with a frames incapable browser. NOFRAMES_START and NOFRAMES_END must come after
the last FRAMESET_START/FRAMESET_END tags.
PARA_START [optparm]
Returns a <P> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
CENTERED_PARA_START [optparm]
Returns a <P ALIGN=CENTER> tag as defined for the current style. If 'optparm'
is passed, it's included in the body of the HTML tag (i.e. within the angle
brackets).
PARA_END [optparm]
Returns a </P> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
SECTION_START [optparm]
Returns a <DIV> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
CENTERED_SECTION_START [optparm]
Returns a <DIV ALIGN=CENTER> tag as defined for the current style. If
'optparm' is passed, it's included in the body of the HTML tag (i.e. within
the angle brackets).
SECTION_END [optparm]
Returns a </DIV> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
LINE_BREAK [optparm]
Returns a <BR> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
HORIZ_RULE [optparm]
Returns a <HR> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
BOLD_START [optparm]
Returns a <B> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
BOLD_END [optparm]
Returns a </B> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
BOLD text [optparm]
Returns a <B>..</B> tag pair as defined for the current style. 'text'
is inserted between the start and end tags. If 'optparm' is passed, it's included
in the body of the HTML tag (i.e. within the angle brackets). This tag provides
a simple way to include bolded text easily.
ITALICS_START [optparm]
Returns a <I> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
ITALICS_END [optparm]
Returns a </I> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
ITALICS text [optparm]
Returns a <I>..</I> tag pair as defined for the current style. 'text'
is inserted between the start and end tags. If 'optparm' is passed, it's included
in the body of the HTML tag (i.e. within the angle brackets). This tag provides
a simple way to include italicized text easily.
UNDERLINE_START [optparm]
Returns a <U> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
UNDERLINE_END [optparm]
Returns a </U> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
UNDERLINE text [optparm]
Returns a <U>..</U> tag pair as defined for the current style. 'text'
is inserted between the start and end tags. If 'optparm' is passed, it's included
in the body of the HTML tag (i.e. within the angle brackets). This tag provides
a simple way to include underlined text easily.
BASE_FONT [optparm]
Returns a <BASEFONT> tag as defined for the current style. This is usually
automatically included after the BODY_START tag - it's unusual that you would
need to explicitly use this in a web page. If 'optparm' is passed, it's included
in the body of the HTML tag (i.e. within the angle brackets).
FONT_START [optparm]
Returns a <FONT> tag as defined for the current style and most recently
specified font (via SET FONT). If no font has been explicitly selected, the
primary font for the style is selected. If 'optparm' is passed, it's included
in the body of the HTML tag (i.e. within the angle brackets).
NAMED_FONT_START name [optparm]
Returns a <FONT> tag as defined for the current style. The font to be
used is passed as name. This must be a font definition for the currently defined
style. If the named font is not found for the currently defined style, the last
font selected via SET FONT (or the styles primary font, if nothing has been
explicitly selected) is used. If 'optparm' is passed, it's included in the body
of the HTML tag (i.e. within the angle brackets). Note that if you need multiple
NAMED_FONT_START tags to the same font, it will be much more efficiant to simple
change the font using SET FONT and use the normal FONT tag.
FONT_END [optparm]
Returns a </FONT> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
FONT text [optparm]
Returns a <FONT>..</FONT> tag pair as defined for the current style
and most recently specified font (via SET FONT). If no font has been explicitly
selected, the primary font for the style is selected. 'text' is inserted between
the start and end tags. If 'optparm' is passed, it's included in the body of
the HTML tag (i.e. within the angle brackets). This tag provides a simple way
to include fontified text easily.
NAMED_FONT name text [optparm]
Returns a <FONT>..</FONT> tag pair as defined for the current style.
The font to be used is passed as name. This must be a font definition for the
currently defined style. If the named font is not found for the currently defined
style, the last font selected via SET FONT (or the styles primary font, if nothing
has been explicitly selected) is used. 'text' is inserted between the start
and end tags. If 'optparm' is passed, it's included in the body of the HTML
tag (i.e. within the angle brackets). This tag provides a simple way to include
fontified text easily. Note that if you need multiple NAMED_FONT_START tags
to the same font, it will be much more efficiant to simple change the font using
SET FONT and use the normal FONT tag.
ORDERED_LIST_START [optparm]
Returns a <OL> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
ORDERED_LIST_END [optparm]
Returns a </OL> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
UNORDERED_LIST_START [optparm]
Returns a <UL> tag as defined for the current style. If 'optparm' is passed,
it's included in the body of the HTML tag (i.e. within the angle brackets).
UNORDERED_LIST_END [optparm]
Returns a </UL> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).
LIST_ITEM [optparm]
Returns a </LI> tag as defined for the current style. If 'optparm' is
passed, it's included in the body of the HTML tag (i.e. within the angle brackets).