URL.isValid
URL.resolve
URL.unescapeString
FUNCTION: WMLBrowser.getVar
WMLBrowser.getVar
(name)
The
WMLBrowser.getVar
function returns the value of the named variable.
If the variable does not exist, the empty string "" will be returned. If the syntax (spelling) of the name is wrong,
invalid
will be returned.
The mandatory
name
parameter is the name of the variable.
Code for GetVarExample.wml
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1">
<p>
getVar example
</p>
<do type="accept">
<go href="GetVarExample.wmls#findgetvar()" />
</do>
</card>
<card id="card2">
<p>
load string = $(str);
</p>
</card>
</wml>
Code for GetVarExample.wmls
extern function findgetvar()
{
var val = Dialogs.prompt("Enter any value", "");
var valu =
WMLBrowser.getVar(val)
;
var str = "The value is " + WMLBrowser.getVar("val");
WMLBrowser.setVar("strng", str);
WMLBrowser.go("GetVarExample.wml#card2");
};
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information