|
WML Links and Images
Links
A WML card can be set up to display the anchor functions of WML.
The <anchor> tag
The <anchor> tag always has a task ("go", "prev", or "refresh")
specified. The task defines what to do when the user selects the link. In this
example, when the user selects the "Next page" link, the task says
"go to the file test.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 title="Anchor Tag">
<p><anchor>Next page
<go href="test.wml"/></anchor></p>
</card>
</wml> |
The <a> tag
The <a> tag always performs a "go" task, with no variables. The example below
does the same as the <anchor> tag example:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="A Tag">
<p><a href="test.wml">Next page</a></p>
</card>
</wml> |
Image
A WML card can be set up to display an image:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Image">
<p>This is an image
<img src="/images/stickman.wbmp" alt="stickman" />
in a paragraph</p>
</card>
</wml> |
The result will look something like this in a mobile phone:
------ Image ------
This is an image in a paragraph
|
Note that .wbmp is the only image type that can be displayed in a WAP browser.

Need an easy way to get data into XML, or transform XML to another format?
MapForce lets you map XML data to/from any combination of XML, database, flat file, Excel 2007, XBRL, or Web services data.
Then it transforms data instantly or auto-generates royalty-free data integration code for recurrent conversions.
Download a free, fully functional 30-day trial to experience the following features:
- Easy-to-use, graphical data mapping interface
- Instant data transformation
- XSLT 1.0/2.0 and XQuery code generation
- Java, C#, and C++ code generation
- Advanced data processing functions
- Support for all major relational databases including SQL Server, IBM DB2, Oracle, and more
- Visual Studio & Eclipse integration
Download a fully-functional trial today!
|
|
|
|