WMLScript Dialogs Standard Library Quick Reference

Preferences - Do not show ads

WMLScript's Dialogs standard library contains functions for displaying alert messages, confirmation messages and input boxes to users.



WMLScript Quick Reference: Functions in the Dialogs Standard Library

alert(message)

Displays message on the screen of the mobile device.

Example:

Dialogs.alert("Error: The number you entered is out of range");



Nokia Mobile Browser 4.0



Sony Ericsson T68i

confirm(message, ok, cancel)

Displays message on the screen of the mobile device. If the user selects the option labeled with ok, true is returned. If the user selects the option labeled with cancel, false is returned.

Example:

var isYes = Dialogs.confirm("Do you want to buy this cell phone?", "Yes", "No");



Nokia Mobile Browser 4.0



Sony Ericsson T68i

prompt(title, default_text)

Displays an input field and returns the text entered by the user. title is the title of the input field and default_text is the text used to initialize the input field.

Example:

var textEntered = Dialogs.prompt("How old are you?", "20");



Nokia Mobile Browser 4.0



Sony Ericsson T68i


Preferences - Do not show ads


Page 2 of 6 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?






Standard WMLScript Libraries Reference - Table of Contents Standard WMLScript Libraries Reference - Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page