FUNCTION:  WMLBrowser.newContext

WMLBrowser.newContext( )
The WMLBrowser.newContext function clears out the current WML browser context. This entails emptying the navigation stack history and clearing out all variables. Upon completion, the empty string "" is returned.
Note that any pending navigation requests from either a WMLBrowser.go or WMLBrowser.prev function call will not be effected.
In WML, the card tag has a newcontext attribute that performs a similar purpose.
This function does not take a parameter.
Code for NewContextExample.wml
<?xml version="1.0"?>

<card id="card1">
   newContext example
   <do type="accept">
      <go href="NewContextExample.wmls#findnewcontext()" />

<card id="card2">
   Should return the empty string
   <br />
   new context = $(newcontext)


Code for NewContextExample.wmls
extern function findnewcontext()
   var newcon = WMLBrowser.newContext();
   WMLBrowser.setVar("newcontext", newcon);

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