For comparison, here is how the same text input box is described in WML, where its result is sent directly to the server:
<input name="wibble"/>
Here, its result is passed to some WMLScript to check it for validity before passing it to the server:
<input name="wibble"/>
Here, it’s displayed to the user in another card for confirmation purposes, without any server transactions involved:
<input name="wibble"/>
These three examples are identical because the same control is always written in the same way in WML. Doing it this way works because none of the controls ever perform any direct action. They are instead linked to the lower-level layers of WML, such as variables and tasks.
For example, in the previous <input>
element, the only effect of the user entering some text into the box
is that the variable wibble
is set to a new value.
The browser doesn’t directly send the text to the server or
call any scripts: it’s up to you to use the value of this
variable at some point.
Get Learning WML, and WMLScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.