Home > Contents > Index > 
SETVAR
Sets the value of a variable.
Syntax
<SETVAR NAME="VAR_NAME" VALUE="VAR_VALUE"/>Parameters
NAME (required)- Name of the variable to set.
 
VALUE (required)- Value to set the variable to.
 
Description
The
SETVARtag sets the value of a variable. The value of the variable exists for the duration of the page evaluation unless it is explicitly deleted usingREMOVEVAR. For more information about variables, see the CS Developer's Guide.errno
The value of
errnois unchanged.Example
This example sets the variable "
color" to "red".
<SETVAR NAME="color" VALUE="red"/>The next example assumes that the variable "
color" has been set to "red" and appends "and blue".
<SETVAR NAME="color" VALUE="Variables.color and blue"/> <CSVAR NAME="Variables.color"/>The browser displays:
red and blueIf a variable was set by loading a file or URL and the content contains
Variables.varnamesyntax, then the variable values can be resolved by:
<SETVAR NAME="myvar" VALUE="Variables.myvar"/>Any variables as part of the value of
myvarare resolved before the value is reset.See Also
Home > Contents > Index > ![]()
FatWire XML Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.