setvar
do
go
noop
onevent
prev
WML TAG: refresh
<refresh> ... </refresh>
The
refresh
tag is used to update the current display. In other words, whatever
card
is currently being displayed will be refreshed.
This is referred to as a
refresh
task. A task is performed in response to an event. There are four tasks in WML:
go, noop, prev,
and
refresh
.
The
refresh
tag can only be nested inside an
anchor, do,
or
onevent
element. This tag can contain one or more
setvar
elements which are used to set new values for named variables.
Nested Tags: setvar
Attributes
class
The optional
class
core attribute is used to assign one or more classes to the element. Multiple classes are separated by white space. The class name is case sensitive (i.e.,
Stocks
and
stocks
are not the same).
id
The optional
id
core attribute is used to assign a unique name to a tag. The name must be unique to the entire deck and not just unique to a card. The first character of the name can be a letter or the underscore. The remaining characters can be any combination of letters, numbers, or underscores.
In this example, after the
refresh
anchor link is clicked, the variable named MyNumber changes from 71 to 348. In card2 the MyNumber variable is displayed using the dollar sign $
variable naming convention.
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Card 1">
<p>
Please click accept:
<do type="accept">
<go href="#card2">
<setvar name="MyNumber" value="71" />
</go>
</do>
</p>
</card>
<card id="card2" title="Card 2">
<p>
MyNumber = $MyNumber<br />
<anchor>
Refresh this page
<refresh>
<setvar name="MyNumber" value="348" />
</refresh>
</anchor>
</p>
</card>
</wml>
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information