WML is a markup language, which is for text formatting and displaying.
The functions of a markup language are limited if there is no support from other programming languages.
Two kinds of programming languages can help to extend the functions of WML:
a server-side script such as CGI Perl executing on the servers, and
a client-side script such as WMLScript executing on the handhelds.
It is based on ECMAScript but it has been modified to better support low bandwidth communication and thin clients.
WMLScripts need to be compiled into byte code on a server before they can run on a handheld device.
WML scripts are not embedded in the WML pages. WML pages only contains references to script URLs.
WMLScript can be used together with WML to provide intelligence to the clients but it has also been designed so that it can be used as a standalone tool.
WMLScript is a part of the WAP specification.
What Is WMLScript Used for?
WMLScript is used to validate user input.
WMLScript is used to generate message boxes and dialog boxes locally, to view error messages and confirmations faster.
WMLScript is used to access facilities of the user agent.