O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interaction in WAP

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required