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 Sites Developer's Guide.Error Numbers
There are no possible
errnofor this tag.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 > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.