Returns the URL of the current card.
The WMLBrowser.getCurrentCard function returns
the smallest relative URL of the current card with respect to the base
URL. If the current card does not have the same base URL as the WML
deck, then an absolute URL is returned.
If
there is no current card, invalid will be returned.
This function does not take a parameter.
<?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>
getCurrentCard example
</p>
<do
type="accept">
<go
href="GetCurrentCardExample.wmls#findgetcurrentcard()" />
</do>
</card>
<card id="card2">
<p>
current card = $(currentcard)
</p>
</card>
</wml>Code for GetCurrentCardExample.wml
extern function findgetcurrentcard()
{
var curcard = WMLBrowser.getCurrentCard();
WMLBrowser.setVar("currentcard", curcard);
WMLBrowser.go("GetCurrentCardExample.wml#card2");
};
Code for GetCurrentCardExample.wmls