IT Community - Software Programming, Web Development and Technical Support

Learn WAP

This is a discussion on Learn WAP within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Specify a Variable with the Setvar Command When someone executes a task (like go, prev, and refresh), the setvar element ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #41 (permalink)  
Old 04-02-2008, 09:47 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

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.
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #42 (permalink)  
Old 04-02-2008, 09:48 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

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>
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #43 (permalink)  
Old 04-02-2008, 09:48 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

To use the variable we created in the example above:
<card id="card2">
<p>You selected: $(schoolname)</p>
</card>
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #44 (permalink)  
Old 04-02-2008, 09:49 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

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"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<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>
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #45 (permalink)  
Old 04-02-2008, 09:50 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The first card might look like this in your mobile phone display:
----- Tutorial ----------

HTML Tutorial
XML Tutorial
WAP Tutorial

Answer
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #46 (permalink)  
Old 04-02-2008, 09:50 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The second card might look like this:
----- Answer ----------

You Selected: HTML
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #47 (permalink)  
Old 04-02-2008, 09:51 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

Example Explained

The Prolog

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml"> The first lines in the WML document are called the prolog. The prolog defines that this is an XML document, it then defines the XML version, and the DTD to be referenced.
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #48 (permalink)  
Old 04-02-2008, 09:51 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The Deck

<wml> ..... </wml> The deck is the WML document itself. It is embedded within <wml> tags
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #49 (permalink)  
Old 04-02-2008, 09:52 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The Cards

<card> ..... </card> Cards are always displayed one at the time. This WML deck contains two cards - one for user input and one for displaying the result.
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #50 (permalink)  
Old 04-02-2008, 09:52 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The <do> element

<do> ... </do> The first card has a <do> element that defines an event to be triggered. The type="accept" attribute of the <do> element causes the label="Answer" to be displayed in the lower left corner of the display.
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #51 (permalink)  
Old 04-02-2008, 09:53 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The Event

The <go> element triggers when the user clicks the <do> label. The href="#card2" attribute of the <go> element causes card2 to be displayed on the screen.
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #52 (permalink)  
Old 04-02-2008, 09:54 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Learn WAP

The Variable

Card2 displays the $(name) variable from card1, because variables are valid across cards.
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #53 (permalink)  
Old 06-19-2008, 03:39 AM
Kaif Kaif is offline
D-Web Trainee
 
Join Date: Jun 2008
Posts: 2
Kaif is on a distinguished road
Default Re: Learn WAP

Hello,
Thanks to share the information about WAP and WML,this language is used for the wireless device or hand held device,can you give some information about how to create a link deck and cards.
__________________
Website development
Free templates
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to learn c++ bikky C and C++ Programming 8 09-26-2008 04:36 AM
Learn How To Access Your PC From Anywhere vadivelanvaidyanathan Computer Hardware 0 09-06-2007 10:03 PM
Best Book to learn VC++ prasannavigneshr C and C++ Programming 9 08-07-2007 01:10 AM
What is the best way to learn PHP hazephase PHP Programming 1 07-15-2007 06:15 PM
Want To Learn C++ | Learn Now Cheap! theseokit C and C++ Programming 2 02-16-2007 08:04 AM


All times are GMT -7. The time now is 12:28 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0