How WMLScript Works

The first thing to keep in mind when dealing with WMLScript is that WMLScript files are not embedded within the WML deck. They are always located in a file separate from the parent WML document.

To understand this concept, let’s look at the model of the wired Internet and how an HTML page that uses JavaScript looks. In an HTML page that uses JavaScript, the JavaScript code is embedded within the document. Figure 9.1 shows the structure of an HTML page (a Web page) with some additional functionality (created with JavaScript). This type of file would have the following type of structure.

Figure 9.1. The structure of an HTML page with JavaScript functionality.

If you were creating an HTML page with JavaScript, you’d have ...

Get WAP 2.0 Development 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.