FUNCTION:  WMLBrowser.getCurrentCard

WMLBrowser.getCurrentCard( )
 
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.
 
Code for GetCurrentCardExample.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>
   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.wmls
extern function findgetcurrentcard()
{
   var curcard = WMLBrowser.getCurrentCard();
   WMLBrowser.setVar("currentcard", curcard);
   WMLBrowser.go("GetCurrentCardExample.wml#card2");
};


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