Positional parameters in same order.
Pass attribute hash as last to subroutine: no
Must pass named parameter interpolate=1 to cause interpolation.
Invalidates cache: YES
Called Routine:
ASP/perl tag calls:
$Tag->selected(
{
name => VALUE,
value => VALUE,
multiple => VALUE,
}
)
OR
$Tag->selected($name, $value, $multiple);
This will output
SELECTED if the variable var_name is equal to
value. If the optional
MULTIPLE argument is present, it will look for any of
a variety of values. Not case sensitive.
Here is a drop-down menu that remembers an item-modifier color selection:
<SELECT NAME="color">
<OPTION [selected color blue]> Blue
<OPTION [selected color green]> Green
<OPTION [selected color red]> Red
</SELECT>
Here is the same thing, but for a shopping-basket color selection
<SELECT NAME="[modifier-name color]">
<OPTION [selected [modifier-name color] blue]> Blue
<OPTION [selected [modifier-name color] green]> Green
<OPTION [selected [modifier-name color] red]> Red
</SELECT>