Ryan's District
October 13, 2008, 10:30:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length

There are currently users in chat
News: Ryan's District Lottery: Claim your ticket or check
Jackpot details  
 
   Home   Help Search Chat Calendar Chess Shop Login Register  
Digg This!
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: WML Variables  (Read 3675 times)
0 Members and 1 Guest are viewing this topic.
ben2ong2
Quality Poster
Paid
Hero Member
*****

Reputation: 17
Offline Offline

Gender: Male
Posts: 2374
9976.80 RD$

View Inventory
Send Money to ben2ong2

View Profile Awards
« on: October 05, 2006, 06:09:01 PM »

Variables
When a user switches from card to card in a deck, we need to store data in variables. WML variables are case sensitive.
Specify a Variable with the Setvar Command
When someone executes a task (like go, prev, and refresh), the setvar element can be used to set a variable with a specified value.
The following example will create a variable named i with a value of 500:
<setvar name="i" value="500"/>
The name and value attributes are required.
Specify a Variable through an Input Element
Variables can also be set through an input element (like input, select, option, etc.).
The following example will create a variable named schoolname:
<card id="card1"><select name="schoolname"><option value="HTML">HTML Tutorial</option><option value="XML">XML Tutorial</option></select></card>
To use the variable we created in the example above:
<card id="card2"><p>You selected: $(schoolname)</p></card>

Logged

You are not allowed to view links.
Register or Login
Free Paid Survey & Home Business Resources.

You are not allowed to view links.
Register or Login
Free Article Directory | Quality Content
Ryan's District
« on: October 05, 2006, 06:09:01 PM »

 Logged
ben2ong2
Quality Poster
Paid
Hero Member
*****

Reputation: 17
Offline Offline

Gender: Male
Posts: 2374
9976.80 RD$

View Inventory
Send Money to ben2ong2

View Profile Awards
« Reply #1 on: October 05, 2006, 06:13:01 PM »

WML Examples
A WML deck with two cards - one for user input and one for displaying the result - can be set up, as demonstrated in this example:
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN""You are not allowed to view links.
Register or Login"><wml><card id="card1" title="Tutorial"><do type="accept" label="Answer">  <go href="#card2"/></do><p><select name="name">   <option value="HTML">HTML Tutorial</option>  <option value="XML">XML Tutorial</option>  <option value="WAP">WAP Tutorial</option></select></p></card><card id="card2" title="Answer"><p>You selected: $(name)</p></card></wml>
The first card might look like this in your mobile phone display:

----- Tutorial ----------
HTML Tutorial   
XML  Tutorial   
WAP  Tutorial  Answer

The second card might look like this:
----- Answer ----------
You Selected: HTML

 
Logged

You are not allowed to view links.
Register or Login
Free Paid Survey & Home Business Resources.

You are not allowed to view links.
Register or Login
Free Article Directory | Quality Content
Ryan's District
   

 Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Archive - WAP2 - WAP - imode
Sponsors: TOP SEO Directory - Online Job Maker - List of Advertisers - BIG VENUE

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.16 seconds with 29 queries.

Google visited last this page Today at 04:20:39 AM