THE META-HTML LANGUAGE REFERENCE MANUAL

Meta Html Tcp/Ip Servers [TOC] Color Manipulation

Section Intro: Html Helpers

Html Helpers

Synopsis:

    The following functions all produce HTML as output and are defined in order to help with the creation of forms and tables.

Commands:

<forms::multiple-instance-resolve SESSION-PACK DEST-PACKSimple

    For every instance of a form in SESSION-PACK, append the elements in order to arrays in DEST-PACK. Thus, if your form contained "name" and "age" input fields, and the user created multiple instances of this form, the output of calling <forms::multiple-instance-resolve mypack results> would be:

    • RESULTS::NAME[0] ==> Brian
    • RESULTS::NAME[1] ==> John
    • ...
    • RESULTS::AGE[0] ==> 38 (i.e., Brian's age)
    • RESULTS::AGE[1] ==> 37 (i.e., John's age).

    You have to call <forms::multiple-instance-resolve> for every form in your page which used <forms::multiple-instances>. Since this requires the use of the session database, you can call <forms::multiple-instance-resolve> from any page at any time to read the contents of the session data, and return the information.

<forms::multiple-instances SESSION-PACK &key [MODIFY-HOOK] [CREATE-HOOK] [REMOVE-HOOK] [METHOD] [ACTION] [ENCTYPE]
  body
</forms::multiple-instances>
Complex

    Creates a repeating form, allowing multiple entries of data sets. The body of this macro is exactly whatever you might put in a standard FORM body. What is needed here is examples, and there really isn't space for any. Please see the file called multiple-instances.mhtml in the distribution for examples.

<forms::standard-buttons &optional [FORMS-INDEX]Simple

    Display the standard buttons for input when performing forms::multiple-instances. If there are no current instances of the form, this produces a language sensitive submit button with the name of "form-create" -- if the instance that this function is called in already has values, then two submit buttons are produced, with names "form-modify" and "form-accept".

    If you would like to control the placement of these buttons, then you should set the variable FORMS::NO-SUBMITS. In this case, you are responsible for calling forms::standard-buttons yourself.

<incdirSimple

    The Web based pathname to the directory containing the document which is currently being included with <include>.

<locale::iso-country-name-to-abbrev2 COUNTRY-NAMESimple

    Returns the two-letter abbreviation of the ISO-3166 country name passsed in COUNTRY-NAME. If COUNTRY NAME isn't an ISO-3166 country name, then it is simply returned as is.

<locale::iso-country-name-to-abbrev3 COUNTRY-NAMESimple

    Returns the three-letter abbreviation of the ISO-3166 country name passsed in COUNTRY-NAME. If there isn't a three-letter abbreviation, but there is a two-letter one, then that is returned. If COUNTRY NAME isn't an ISO-3166 country name, then it is simply returned as is.

<locale::select-common-country POSTNAME &optional [SITENAME]Simple

    Produce a selection widget suitable for placing in a form which allows the user to select a country from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. SITENAME is the name of another variable which can contain the currently selected country.

    This differs from locale::select-country only in the number of countries that are displayed.

<locale::select-country POSTNAME &optional [SITENAME]Simple

    Produce a selection widget suitable for placing in a form which allows the user to select a country from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. SITENAME is the name of another variable which can contain the currently selected country -- this variable must be fully qualified with its package name (i.e., DEFAULT::FOO, or SITE::COUNTRY).

<locale::select-from-country POSTNAME SITENAME COUNTRY-ARRAYSimple

    Produce a selection widget suitable for placing in a form which allows the user to select a country from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. SITENAME is the name of another variable which can contain the currently selected country -- this variable must be fully qualified with its package name (i.e., DEFAULT::FOO, or SITE::COUNTRY).

<locale::select-iso-country POSTNAME &optional [SITENAME]Simple

    Produce a selection widget suitable for placing in a form which allows the user to select a country from a pull-down menu which includes all of the ISO-3166 country names. POSTNAME is the name of the variable which should be posted when the form is submitted. SITENAME is the name of another variable which can contain the currently selected country -- this variable must be fully qualified with its package name (i.e., DEFAULT::FOO, or SITE::COUNTRY).

<locale::select-iso-country-abbrev2 POSTNAME &optional [SITENAME]Simple

    Produce a selection widget suitable for placing in a form which allows the user to select an ISO-3166 country name from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. The long name of the country is displayed, but the short, two-letter version of the country is returned. SITENAME is the name of another variable which can contain the currently selected country.

<locale::select-iso-country-abbrev3 POSTNAME &optional [SITENAME]Simple

    Produce a selection widget suitable for placing in a form which allows the user to select an ISO-3166 country name from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. The long name of the country is displayed, but the short, three-letter version of the country is returned. SITENAME is the name of another variable which can contain the currently selected country.

<locale::select-province POSTNAME SITENAMESimple

    Produce a selection widget suitable for placing in a form which allows the user to select a province name from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. The long name of the province is displayed, but the short, two- or three-letter version of the province is returned. SITENAME is the name of another variable which can contain the currently selected province.

<locale::select-state POSTNAME SITENAMESimple

    Produce a selection widget suitable for placing in a form which allows the user to select a US state name from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. The long name of the state is displayed, but the short, two-letter version of the state is returned. SITENAME is the name of another variable which can contain the currently selected state.

<locale::select-state-or-province POSTNAME SITENAMESimple

    Produce a selection widget suitable for placing in a form which allows the user to select a US state or province name from a pull-down menu. POSTNAME is the name of the variable which should be posted when the form is submitted. The long name of the state or province is displayed, but the short, two- or three-letter version of the state or province is returned. SITENAME is the name of another variable which can contain the currently selected state or province.

<menu TITLE &key [NOBR]
  body
</menu>
Complex

    Create an HTML menu with title, text and links.

    Calling sequence:

     <menu "This Is The Title">
       This is link text: target.mhtml
       External Site:  http://www.external.com/welcome.mhtml
     </menu>
     

<messageSimple

    Add BODY to the contents of the session variable "message". Also see show-message.

<meta-htmlSimple

    Produces the canonical form of the words "Meta-HTML".

<select-option VARNAME DISPLAY &optional [VALUE]Simple

    Use instead of the <option> HTML tag within the select HTML tag.

    Creates an option item in the page in which VARNAME is expected to contain the current value of the choice, or nothing, if no choice has been made. If you supply the optional VALUE argument, that value is returned instead of DISPLAY.

    If VARNAME contains VALUE, then this option has the HTML SELECTED attribute turned on.

    Example:

     <select name=airport>
       <select-option airport Atlanta>
       <select-option airport Boston>
       <select-option airport Chicago>
       <select-option airport "Los Angeles">
       <select-option airport "New York">
       <select-option airport Miami>
       <select-option airport "San Francisco">
     </select>

<show-messageSimple

    Display the contents of the session variable "message", and then remove that variable from the session. Also see message.

<small-caps &key [UPPER=SIZE] [LOWER=SIZE] [OTHER=SIZE]
  body
</small-caps>
Complex

    Modify the characters in BODY raising lower-case characters to upper-case, and changing the size of fonts as directed.

    For example, this is how the text of "Hello There" can be displayed with lowercase characters as smaller uppercase versions of themselves.

      <small-caps lower=-1>Hello There</small-caps>
    produces:
    HELLO THERE

<source-link TEXTSimple

    You write `Click here for source.'

<source-of WEB-PATH HIGHLIGHT-KEYWORDS-PSimple

    Display the contents of WEB-PATH in HTML. Use sparingly. If HIGHLIGHT-KEYWORDS-P is non-empty, then make each Meta-HTML function in the displayed text be a link which will display the contents of the the manual page for that keyword.

<thisdirSimple

    The fully qualified pathname to the directory containing the currently executing document.

<thisdocSimple

    The complete URL to this document, without the query string or path information.

<thisfileSimple

    The fully qualified pathname to the document which is currently executing.

<thispageSimple

    The local web-based URL to this document, without the query string or path information.

<url TEXT &key [TARGET]Simple

    Shows TEXT as a linkable URL. Example:

     For more information on <Meta-HTML>, see <url http://www.metahtml.org>,
     or send mail to <url info@metahtml.org>.
     
    produces:
    For more information on Meta-HTML, see http://www.metahtml.org,
     or send mail to info@metahtml.org.
     

<verbatim &key [QUOTE]Simple

    Insert BODY verbatim, avoiding doing any processing on the contents. If the keyword argument QUOTE is given, occurrences of characters with special meaning to HTML are replaced with the HTML code to produce that character in the output page.

    Contrast this with comment.

<vertical-table ARRAY-NAME WIDTH LINK EXTRA-LINK-INFOSimple

    Lay out a table according to number of columns, but listing each item vertically. The number of items to each column is determined by dividing the total number of items by the number of desired columns.

Edit Section
Function Index
Variable Index


The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox
Found a bug? Send mail to bug-manual@metahtml.org