Difference between revisions of "Ns formvalueput"
Jump to navigation
Jump to search
(Framed the page in, documented what I could. Needs examples.) |
m (Fixed typo) |
||
Line 13: | Line 13: | ||
'''DESCRIPTION''' | '''DESCRIPTION''' | ||
− | : This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given | + | : This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML) |
: The elements (tags) & types supported are: | : The elements (tags) & types supported are: | ||
:* INPUT | :* INPUT |
Revision as of 19:02, 8 February 2008
Man page: not in source tree
NAME
- ns_formvalueput - Sets the value of input elements in HTML documents
SYNOPSIS
- ns_formvalueput htmlpiece dataname datavalue
DESCRIPTION
- This command sets the value of an HTML input element with NAME=dataname (of any type) to the given datavalue. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)
- The elements (tags) & types supported are:
- INPUT
- image
- ignored
- submit
- ignored
- reset
- ignored
- checkbox
- will be checked if the NAME attribute matches the datavalue (case-insensitive)
- radio
- will be selected if the NAME attribute matches the datavalue (case-insensitive)
- any other
- If the NAME attribute matches the dataname, the VALUE attribute will be set to the datavalue
- TEXTAREA
- If the NAME attribute matches the dataname, all the enclosed text up to the next </textarea> tag will be replaced by the datavalue.
- SELECT
- If the NAME attribute of the SELECT tag matches the dataname, this will find the first enclosed OPTION tag with a VALUE attribute that matches datavalue, and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.
EXAMPLES
NOTES
- This procedure requires that Ns_tagelement not return the trailing > for elements. That feature of Ns_tagelement sometimes confuses people.