Manual Pages for UNIX Darwin command on man html
MyWebUniversity

Manual Pages for UNIX Darwin command on man html

html(n) HTML Generation html(n)

NAME

html - Procedures to generate HTML structures

SYNOPSIS

package require TTccll 88..22 package require hhttmmll ??11..22..22?? ::::hhttmmll::::aauutthhoorr author ::::hhttmmll::::bbooddyyTTaagg args ::::hhttmmll::::cceellll param value ?tag? ::::hhttmmll::::cchheecckkbbooxx name value ::::hhttmmll::::cchheecckkSSeett key sep list ::::hhttmmll::::cchheecckkVVaalluuee name ?value? ::::hhttmmll::::cclloosseeTTaagg ::::hhttmmll::::ddeeffaauulltt key ?param? ::::hhttmmll::::ddeessccrriippttiioonn description ::::hhttmmll::::eenndd ::::hhttmmll::::eevvaall arg ?args? ::::hhttmmll::::eexxttrraaccttPPaarraamm param key ?varName? ::::hhttmmll::::ffoonntt args ::::hhttmmll::::ffoorr start test next body ::::hhttmmll::::ffoorreeaacchh varlist1 list1 ?varlist2 list2 ...? body ::::hhttmmll::::ffoorrmmVVaalluuee name ?defvalue? ::::hhttmmll::::ggeettFFoorrmmIInnffoo args ::::hhttmmll::::ggeettTTiittllee ::::hhttmmll::::hh level string ?param? ::::hhttmmll::::hh11 string ?param? ::::hhttmmll::::hh22 string ?param? ::::hhttmmll::::hh33 string ?param? ::::hhttmmll::::hh44 string ?param? ::::hhttmmll::::hh55 string ?param? ::::hhttmmll::::hh66 string ?param? ::::hhttmmll::::hhddrrRRooww args ::::hhttmmll::::hheeaadd title ::::hhttmmll::::hheeaaddTTaagg string ::::hhttmmll::::iiff expr1 body1 ?eellsseeiiff expr2 body2 ...? ?eellssee bodyN? ::::hhttmmll::::kkeeyywwoorrddss args ::::hhttmmll::::mmaaiillttoo email ?subject? ::::hhttmmll::::mmeettaa args ::::hhttmmll::::mmiinnoorrMMeennuu list ?sep? ::::hhttmmll::::mmiinnoorrLLiisstt list ?ordered? ::::hhttmmll::::ooppeennTTaagg tag args ::::hhttmmll::::ppaasssswwoorrddIInnppuutt ?name? ::::hhttmmll::::ppaasssswwoorrddIInnppuuttRRooww label ?name? ::::hhttmmll::::qquuootteeFFoorrmmVVaalluuee value ::::hhttmmll::::rraaddiiooSSeett key sep list ::::hhttmmll::::rraaddiiooVVaalluuee name value ::::hhttmmll::::rreeffrreesshh seconds url ::::hhttmmll::::iinniitt ?list? ::::hhttmmll::::rrooww args ::::hhttmmll::::ppaarraammRRooww list ?rparam? ?cparam? ::::hhttmmll::::sseelleecctt name param choices ?current? ::::hhttmmll::::sseelleeccttPPllaaiinn name param choices ?current? ::::hhttmmll::::ssuubbmmiitt label ?name? ::::hhttmmll::::sseett var val ::::hhttmmll::::ttaabblleeFFrroommAArrrraayy arrname ?param? ?pat? ::::hhttmmll::::ttaabblleeFFrroommLLiisstt querylist ?param? ::::hhttmmll::::tteexxttaarreeaa name ?param? ?current? ::::hhttmmll::::tteexxttIInnppuutt name value args ::::hhttmmll::::tteexxttIInnppuuttRRooww label name value args ::::hhttmmll::::ttiittllee title ::::hhttmmll::::vvaarrEEmmppttyy name ::::hhttmmll::::wwhhiillee test body

DESCRIPTION

The package hhttmmll provides commands that generate HTML. These commands typically return an HTML string as their result. In particular, they do not output their result to ssttddoouutt.

The command ::::hhttmmll::::iinniitt should be called early to initialize the mod-

ule. You can also use this procedure to define default values for HTML tag parameters. ::::hhttmmll::::aauutthhoorr author Side effect only. Call this before ::::hhttmmll::::hheeaadd to define an author for the page. The author is noted in a comment in the HEAD section. ::::hhttmmll::::bbooddyyTTaagg args Generate a BODY tag. The tag parameters are taken from args or from the body.* attributes define with ::::hhttmmll::::iinniitt. ::::hhttmmll::::cceellll param value ?tag? Generate a TD (or TH) tag, a value, and a closing TD (or TH) tag. The tag parameters come from param or TD.* attributes defined with ::::hhttmmll::::iinniitt. This uses ::::hhttmmll::::ffoonntt to insert a standard FONT tag into the table cell. The tag argument defaults to "td". ::::hhttmmll::::cchheecckkbbooxx name value Generate a CHECKBOX form element with the specified name and value. This uses ::::hhttmmll::::cchheecckkVVaalluuee. ::::hhttmmll::::cchheecckkSSeett key sep list Generate a set of CHECKBOX form elements and associated labels.

The list should contain an alternating list of labels and val-

ues. This uses ::::hhttmmll::::cchheecckkbbooxx. ::::hhttmmll::::cchheecckkVVaalluuee name ?value? Generate the "name=name value=value for a CHECKBOX form element. If the CGI variable name has the value value, then SELECTED is added to the return value. value defaults to "1". ::::hhttmmll::::cclloosseeTTaagg Pop a tag off the stack created by ::::hhttmmll::::ooppeennTTaagg and generate the corresponding close tag (e.g., /BODY). ::::hhttmmll::::ddeeffaauulltt key ?param? This procedure is used by ::::hhttmmll::::ttaaggPPaarraamm to generate the name,

value list of parameters for a tag. The ::::hhttmmll::::ddeeffaauulltt proce-

dure is used to generate default values for those items not already in param. If the value identified by key matches a value in param then this procedure returns the empty string.

Otherwise, it returns a "parameter=value" string for a form ele-

ment identified by key. The key has the form "tag.parameter"

(e.g., body.bgcolor). Use ::::hhttmmll::::iinniitt to register default val-

ues. param defaults to the empty string. ::::hhttmmll::::ddeessccrriippttiioonn description Side effect only. Call this before ::::hhttmmll::::hheeaadd to define a description META tag for the page. This tag is generated later in the call to ::::hhttmmll::::hheeaadd. ::::hhttmmll::::eenndd Pop all open tags from the stack and generate the corresponding

close HTML tags, (e.g., ).

::::hhttmmll::::eevvaall arg ?args?

This procedure is similar to the built-in Tcl eevvaall command. The

only difference is that it returns "" so it can be called from an HTML template file without appending unwanted results. ::::hhttmmll::::eexxttrraaccttPPaarraamm param key ?varName? This is a parsing procedure that extracts the value of key from

param, which is a HTML-style "name=quotedvalue" list. varName

is used as the name of a Tcl variable that is changed to have the value found in the parameters. The function returns 1 if the parameter was found in param, otherwise it returns 0. If the varName is not specified, then key is used as the variable name. ::::hhttmmll::::ffoonntt args Generate a standard FONT tag. The parameters to the tag are taken from args and the HTML defaults defined with ::::hhttmmll::::iinniitt. ::::hhttmmll::::ffoorr start test next body

This procedure is similar to the built-in Tcl ffoorr control struc-

ture. Rather than evaluating the body, it returns the subst'ed body. Each iteration of the loop causes another string to be concatenated to the result value. ::::hhttmmll::::ffoorreeaacchh varlist1 list1 ?varlist2 list2 ...? body

This procedure is similar to the built-in Tcl ffoorreeaacchh control

structure. Rather than evaluating the body, it returns the subst'ed body. Each iteration of the loop causes another string to be concatenated to the result value. ::::hhttmmll::::ffoorrmmVVaalluuee name ?defvalue? Return a name and value pair, where the value is initialized from existing CGI data, if any. The result has this form: name="fred" value="freds value" ::::hhttmmll::::ggeettFFoorrmmIInnffoo args Generate hidden fields to capture form values. If args is empty, then hidden fields are generated for all CGI values.

Otherwise args is a list of string match patterns for form ele-

ment names. ::::hhttmmll::::ggeettTTiittllee Return the title string, with out the surrounding TITLE tag, set with a previous call to ::::hhttmmll::::ttiittllee. ::::hhttmmll::::hh level string ?param? Generate a heading (e.g., H1) tag. The string is nested in the heading, and param is used for the tag parameters. ::::hhttmmll::::hh11 string ?param? Generate an H1 tag. See ::::hhttmmll::::hh. ::::hhttmmll::::hh22 string ?param? Generate an H2 tag. See ::::hhttmmll::::hh. ::::hhttmmll::::hh33 string ?param? Generate an H3 tag. See ::::hhttmmll::::hh. ::::hhttmmll::::hh44 string ?param? Generate an H4 tag. See ::::hhttmmll::::hh. ::::hhttmmll::::hh55 string ?param? Generate an H5 tag. See ::::hhttmmll::::hh. ::::hhttmmll::::hh66 string ?param? Generate an H6 tag. See ::::hhttmmll::::hh. ::::hhttmmll::::hhddrrRRooww args Generate a table row, including TR and TH tags. Each value in args is place into its own table cell. This uses ::::hhttmmll::::cceellll. ::::hhttmmll::::hheeaadd title

Generate the HEAD section that includes the page TITLE. If pre-

vious calls have been made to ::::hhttmmll::::aauutthhoorr, ::::hhttmmll::::kkeeyywwoorrddss, ::::hhttmmll::::ddeessccrriippttiioonn, or ::::hhttmmll::::mmeettaa then additional tags are inserted into the HEAD section. This leaves an open HTML tag pushed on the stack with ::::hhttmmll::::ooppeennTTaagg. ::::hhttmmll::::hheeaaddTTaagg string Save a tag for inclusion in the HEAD section generated by ::::hhttmmll::::hheeaadd. The string is everything in the tag except the enclosing angle brackets, < >. ::::hhttmmll::::iiff expr1 body1 ?eellsseeiiff expr2 body2 ...? ?eellssee bodyN?

This procedure is similar to the built-in Tcl iiff control struc-

ture. Rather than evaluating the body of the branch that is taken, it returns the subst'ed body. Note that the syntax is

slightly more restrictive than that of the built-in Tcl iiff con-

trol structure. ::::hhttmmll::::kkeeyywwoorrddss args Side effect only. Call this before ::::hhttmmll::::hheeaadd to define a keyword META tag for the page. The META tag is included in the result of ::::hhttmmll::::hheeaadd. ::::hhttmmll::::mmaaiillttoo email ?subject? Generate a hypertext link to a mailto: URL. ::::hhttmmll::::mmeettaa args Side effect only. Call this before ::::hhttmmll::::hheeaadd to define a

META tag for the page. The args is a Tcl-style name, value list

that is used for the name= and value= parameters for the META tag. The META tag is included in the result of ::::hhttmmll::::hheeaadd. ::::hhttmmll::::mmiinnoorrMMeennuu list ?sep?

Generate a series of hypertext links. The list is a Tcl-style

name, value list of labels and urls for the links. The sep is the text to put between each link. It defaults to " | ". ::::hhttmmll::::mmiinnoorrLLiisstt list ?ordered? Generate an ordered or unordered list of links. The list is a

Tcl-style name, value list of labels and urls for the links.

ordered is a boolean used to choose between an ordered or unordered list. It defaults to ffaallssee. ::::hhttmmll::::ooppeennTTaagg tag args Push tag onto a stack and generate the opening tag for tag. Use ::::hhttmmll::::cclloosseeTTaagg to pop the tag from the stack. ::::hhttmmll::::ppaasssswwoorrddIInnppuutt ?name?

Generate an INPUT tag of type PASSWORD. The name defaults to

"password". ::::hhttmmll::::ppaasssswwoorrddIInnppuuttRRooww label ?name?

Format a table row containing a label and an INPUT tag of type

PASSWORD. The name defaults to "password". ::::hhttmmll::::qquuootteeFFoorrmmVVaalluuee value Quote special characters in value by replacing them with HTML entities for quotes, ampersand, and angle brackets. ::::hhttmmll::::rraaddiiooSSeett key sep list

Generate a set of INPUT tags of type RADIO and an associated

text label. All the radio buttons share the same key for their name. The sep is text used to separate the elements. The list

is a Tcl-style label, value list.

::::hhttmmll::::rraaddiiooVVaalluuee name value Generate the "name=name value=value for a RADIO form element. If the CGI variable name has the value value, then SELECTED is added to the return value. ::::hhttmmll::::rreeffrreesshh seconds url Set up a refresh META tag. Call this before ::::hhttmmll::::hheeaadd and the HEAD section will contain a META tag that causes the document to refresh in seconds seconds. The url is optional. If specified, it specifies a new page to load after the refresh interval. ::::hhttmmll::::iinniitt ?list?

::::hhttmmll::::iinniitt accepts a Tcl-style name-value list that defines

values for items with a name of the form "tag.parameter". For

example, a default with key "body.bgcolor" defines the back-

ground color for the BODY tag. ::::hhttmmll::::rrooww args Generate a table row, including TR and TD tags. Each value in args is place into its own table cell. This uses ::::hhttmmll::::cceellll. ::::hhttmmll::::ppaarraammRRooww list ?rparam? ?cparam? Generate a table row, including TR and TD tags. Each value in list is placed into its own table cell. This uses ::::hhttmmll::::cceellll. The value of rparam is used as parameter for the TR tag. The value of cparam is passed to ::::hhttmmll::::cceellll as parameter for the TD tags. ::::hhttmmll::::sseelleecctt name param choices ?current?

Generate a SELECT form element and nested OPTION tags. The name

and param are used to generate the SELECT tag. The choices list

is a Tcl-style name, value list.

::::hhttmmll::::sseelleeccttPPllaaiinn name param choices ?current? Like ::::hhttmmll::::sseelleecctt except that choices is a Tcl list of values

used for the OPTION tags. The label and the value for each

OPTION are the same.

::::hhttmmll::::ssuubbmmiitt label ?name?

Generate an INPUT tag of type SUBMIT. name defaults to "submit".

::::hhttmmll::::sseett var val

This procedure is similar to the built-in Tcl sseett command. The

main difference is that it returns "" so it can be called from an HTML template file without appending unwanted results. The other difference is that it must take two arguments. ::::hhttmmll::::ttaabblleeFFrroommAArrrraayy arrname ?param? ?pat? Generate a TABLE and nested rows to display a Tcl array. The param are for the TABLE tag. The pat is a ssttrriinngg mmaattcchh pattern used to select array elements. It defaults to "*". ::::hhttmmll::::ttaabblleeFFrroommLLiisstt querylist ?param? Generate a TABLE and nested rows to display querylist, which is

a Tcl-style name, value list. The param are for the TABLE tag.

::::hhttmmll::::tteexxttaarreeaa name ?param? ?current? Generate a TEXTAREA tag wrapped around its current values. ::::hhttmmll::::tteexxttIInnppuutt name value args

Generate an INPUT form tag with type TEXT. This uses

::::hhttmmll::::ffoorrmmVVaalluuee. The args is any additional tag attributes

you want to put into the INPUT tag.

::::hhttmmll::::tteexxttIInnppuuttRRooww label name value args

Generate an INPUT form tag with type TEXT formatted into a table

row with an associated label. The args is any additional tag

attributes you want to put into the INPUT tag.

::::hhttmmll::::ttiittllee title Side effect only. Call this before ::::hhttmmll::::hheeaadd to define the TITLE for a page. ::::hhttmmll::::vvaarrEEmmppttyy name This returns 1 if the named variable either does not exist or has the empty string for its value. ::::hhttmmll::::wwhhiillee test body

This procedure is similar to the built-in Tcl wwhhiillee control

structure. Rather than evaluating the body, it returns the subst'ed body. Each iteration of the loop causes another string to be concatenated to the result value.

SEE ALSO

htmlparse, ncgi

KKEEYYWWOORRDDSS

checkbox, checkbutton, form, html, radiobutton, table

html 1.2.2 html(n)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™