NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_tagelementset(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_tagelementset - Set the value of the value attribute in an HTML element

Table Of Contents

Synopsis

Description

This command takes a variable name to upvar, tagvar. The variable should exist in the calling environment and should contain an HTML element that has had its closing ">" removed. The string is searched for the attribute attribute, which will be removed if found. A value attribute will be added to the end of the string with value value, which will be surrounded with double quotes. This procedure does not close the tag with a ">".

COMMANDS

ns_tagelementset tagvar attribute value

EXAMPLES

   % set tag {<input type="hidden" name="myfield" value="100"}
   <input type="hidden" name="myfield" value="100"
   % ns_tagelementset tag value 250
   <input type="hidden" name="myfield"  value="250"

NOTES I believe using "value" as the attribute name in the output instead of the passed in attribute may be a bug.

See Also

nsd

Keywords

ns_tagelement