FUNCTION:  Dialogs.prompt

Dialogs.prompt(message, defaultinput)
The Dialogs.prompt function displays a text message and a default input value, and requires that the user accept the default input or enter a different value. The displayed message is said to prompt the user for an input.
The input value is returned by this function.
The mandatory message parameter is a string or text that requests an input from the user.
The mandatory defaultinput parameter can be either a variable or a string value that will be displayed as the default input. You can use the empty string "" if you do not wish to display a default input.
Code for PromptExample.wml
<?xml version="1.0"?>

   <card id="card1">
         prompt example
      <do type="accept">
         <go href="PromptExample.wmls#displayprompt()" />

   <card id="card2">
         Amount = $amount


Code for PromptExample.wmls
extern function displayprompt()
   var mydefault = "71";
   var result = Dialogs.prompt("Enter amount", mydefault);
   WMLBrowser.setVar("amount", result);

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information