WML <setvar> Tag

        The <setvar> element is used as a result of the user executing some task. The >setvar> element can be used to set a variable's state within the following elements: <go>, <prev>, and <refresh>.


        This element supports the following attributes:

        namestringSets the name of the variable
        valuestringSets the value of the variable
        classclass dataSets a class name for the element.
        idelement IDA unique ID for the element.


        The following element would create a variable named a with a value of 1000:

        <setvar name="a" value="1000"/>

        Following is another example showing usage of this element.

        <?xml version="1.0"?>
        <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
          Go to next chapter
          <go href="#chapter2"> 
           <setvar name="x" value="30"/> 
        Kickstart Your Career

        Get certified by completing the course

        Get Started