- WML Tutorial
- WML - Home
- WML - Overview
- WML - Environment
- WML - Syntax
- WML - Elements
- WML - Comments
- WML - Variables
- WML - Formatting
- WML - Fonts
- WML - Images
- WML - Tables
- WML - Links
- WML - Tasks
- WML - Inputs
- WML - Submit Data
- WML - Server Scripts
- WML - Events
- WML - Timer
- WML - Template
- WML - DTD
- WML2 - Tutorial
- WML References
- WML - Entities
- WML - Tags Reference
- WML Tools
- WAP - Emulators
- WML - Validator
- WML Useful Resources
- WML - Quick Guide
- WML - Useful Resources
- WML - Discussion
get
post
true
false
WML <go> Tag
The <go/> element represents a <go> task represents the action of going to a new card.
Attributes:
This element supports the following attributes:
Attribute | Value | Description |
---|---|---|
href | URL | Gives the URL of the new card. Relative URLs are resolved relative to the current card |
method | Specifies the method that should be used to fetch the deck. This must be one of the values get or post,
corresponding to the GET and POST methods of HTTP. When using method="get", the data is sent as an request with ? data appended to the url. The method has a disadvantage, that it can be used only for a limited amount of data, and if you send sensitive information it will be displayed on the screen and saved in the web server's logs. So do not use this method if you are sending password etc. With method="post", the data is sent as an request with the data sent in the body of the request. This method has no limit, and sensitive information is not visible in the URL | |
sendreferer |
| If set to true, the browser sends the URL of the current deck along with the request. This URL is sent as a relative URL if possible. The purpose of this is to allow servers to perform simple access control on decks, based on which decks are linking to them. For example, using HTTP, this attribute is sent in the HTTP Referer header. |
accept-charset | charset_list | Specifies a comma- or space-separated list of character sets that can encode data sent to the server in a POST request. The default value is "unknown". |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
Example:
Following is the example showing usage of <go> element.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="GO Element"> <p> <anchor> Chapter 2 : <go href="chapter2.wml"/> </anchor> </p> </card> </wml>
Another example showing how to upload data using Get Method
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="GO Element"> <p> <anchor> Using Get Method <go href="chapter2.wml?x=17&y=42" method="get"/> </anchor> </p> </card> </wml>
Another example showing how to upload data using <setvar> element.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="GO Element"> <p> <anchor> Using setvar: <go href="chapter2.wml"> <setvar name="x" value="17"/> <setvar name="y" value="42"/> </go> </anchor> </p> </card> </wml>
Another example showing how to upload data using <postfiled> element
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="GO Element"> <p> <anchor> Using setvar: <go href="chapter2.wml" method="get"> <postfield name="x" value="17"/> <postfield name="y" value="42"/> </go> </anchor> </p> </card> </wml>