Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project









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"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

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

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

</wml>

 
Code for NewContextExample.wmls
extern function findnewcontext()
{
   var newcon = WMLBrowser.newContext();
   WMLBrowser.setVar("newcontext", newcon);
   WMLBrowser.go("NewContextExample.wml#card2");
};

 


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