spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column63


WMLScript Standard Libraries

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

The Dialogs Library

This library contains a set of user interface functions, similar to the message boxes of JavaScript.

prompt()

This function displays a given message and prompts for an input. A default input is also specified as the second parameter. Returns the user input.

Syntaxprompt(message, defaultInput)
Parametersmessage = String, defaultInput = String
ReturnsString or invalid
Examples:var a = Dialogs.prompt("Enter number of years for computing the mortgage:", "8"); // a = "12"

confirm()

This function displays a given message and waits for the user to select one of the reply alternatives: ok and cancel. Returns true for ok and false for cancel. The ok and cancel strings have implementation-dependent defaults and are programmable by this function.

Syntaxconfirm(message, okMessage, cancelMessage)
Parametersmessage = String, okMessage = String, cancelMessage = String
ReturnsBoolean or invalid
Examples:var a = Dialogs.confirm("Delete Entry?", "Yes", "Later"); // a = true ("Yes" is selected)

alert()

This function displays the given message, waits for the user to confirm, and then returns an empty string.

Syntaxconfirm(message)
Parametersmessage = String
ReturnsString or invalid
Examples:var a = Dialogs.alert("Number of years for mortgages must be less than 25!"); // a = ""

Next: A Final Word

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


Created: June 5, 2000
Revised: June 5, 2000

URL: http://www.webreference.com/js/column63/10.html