|
The GO task represents the action of switching to a new card
|
|
The code below shows How to use GO Tasks
|
page1.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>
<p>
<anchor>
Go To Page2
<go href="page2.wml"/>
</anchor>
</p>
</card>
</wml>
page2.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>
<p>
<anchor>
Go To Page1
<prev/>
</anchor>
</p>
</card>
</wml>
|
|
Running the code
|
1) save the above file as page1.wml, page2.wml in E:\wml\ Directory
2) Open UPSDK Browser, which will be a shortcut created during installation
3) Type in the URL file://e:/wml/page1.wml next to GO Button Text Box, Hit Enter ..........
4) Always remember whenever u make changes to the wml script, u must click on Edit Clear Cache to View New Screen and Re-Enter URL
|
|
Using Refresh Command
|
|
Some times it may be required that u need to Refresh a WML file on the Client without actually clearing cache, Best
Example is Online Mobile Stock Updates......
|
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<p>
<anchor>
Refresh this
<go href="refresh.wml"/>
<refresh>
<setvar name="x" value="30"/>
</refresh>
</anchor>
</p>
</card>
</wml>
|
|
Running the code
|
1) save the above file as refresh.wml in E:\wml\ Directory
2) Open UPSDK Browser, which will be a shortcut created during installation
3) Type in the URL file://e:/wml/refresh.wml next to GO Button Text Box, Hit Enter ..........
4) Always remember whenever u make changes to the wml script, u must click on Edit Clear Cache to View New Screen and Re-Enter URL
|
|
What Next ? Variables and Form Submission
|
|
Reach me!
|
|
|
Java, J2EE, J2SE and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the United States and other countries.
|