WML: events and tasks
do: mechanism to perform actions on the current card
postfield: post the value of a variable in a URL request
go, prev: go to a given URL or to the calling one
<card title=“Want a free beer?”>
<do type=“accept” label=“Get”>
<go href=“get.wml” method=“post”>
<postfield name=“beer” value=“1”/>
<do type=“prev” label=“Cancel”><prev/></do>
Notes:
This card displays a card asking the user whether he/she wants to get a free beer. The user can either choose to get one, or can go to the previous page.
The do element can have multiple types: accept, for acknowledgements, prev to navigate backwards in the history, reset to reset the state of the browser.
The label attribute describes an optional text to be displayed on the user interface.
The go element is a task indicating the navigation to a particular URL. The URL can refer to any URL or it can refer to a card on the current deck, if it’s specified using “#name”. The target card must exist on the deck; such a card should have the id attribute set to name.