Page 153 - DCAP512_WAP_AND_WML
P. 153
Kumar Vishal, Lovely Professional University
Unit 11: Using WML Script
Unit 11: Using WML Script Notes
CONTENTS
Objectives
Introduction
11.1 WMLScript
11.1.1 The Rules of WML Scripts
11.1.2 What are the WML Script Syntax Rules?
11.2 WML vs Java Script
11.3 Using WMLScript Functions
11.3.1 Working with Variables
11.3.2 Operators
11.4 Using WMLScript Libraries
11.4.1 Script Libraries
11.5 Sample Application
11.6 Summary
11.7 Keywords
11.8 Review Questions
11.9 Further Readings
Objectives
After studying this unit, you will be able to:
Scan WMLScript Vs Javascript
Describe WMLScript functions
Demonstrate WMLScript Libraries
Introduction
To enhance application performance and user experience scripting is done. WML uses WMLScript
which is a lightweight JavaScript language to run simple code on the client. This unit with give
you a basic idea of WMLScript, the rules of WMLScript, variables, operators, control constructs,
reserved words, functions, its standard libraries, arrays and pragmas. Lastly you will be introduced
to some general coding principles which will be useful if you are planning to develop a WAP
site as well some technical tips for the experienced WAP developers.
11.1 WMLScript
WML uses WMLScript to run simple code on the client. WMLScript is a light JavaScript language.
However, WML scripts are not embedded in the WML pages. WML pages only contains references
to script URLs. WML scripts need to be compiled into byte code on a server before they can run
in a WAP browser.
LOVELY PROFESSIONAL UNIVERSITY 147