Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
WAP
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Tutorial


First Card

  

Writing more than one cards in a deck.

In this lesson we will write application that uses two cards in a deck. First card is displayed only for some time and after that it directly go to the second card. 

 


Second Card

   Using this code you can display some information in your application that automatically goes after specified time. Here we are displaying "Get ready to learn WAP in record time!" in first Card and second card displays "Welcome to the exciting world of WAP!" message.   
  

Now here is the code of the program.

<?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="Learning WML"> 
<onevent type="ontimer">
<go href="#menu"/>
</onevent>
<timer value="30"/>
<p>
Get ready to learn WAP in record time!
</p>
<do type="accept" name="card2" label="Continue">
<go href="#menu"/>
</do>
</card> 
<card id="menu" title="Learning WML">
<p>Welcome to the exciting world of WAP!</p>
</card>
</wml>

First of all copy the above code in the following text box and then press test button to test it.


In the above example we have created two cards. You can create as many as you want, but the card ids should the unique.

Now take a closer look at <timer> element. Timer element invokes a task after some period of user inactivity. Syntax of time element is:

         <timer name="variable" value="value"/>

Attributes

    name: Name of the variable.
    value: 1/10 of seconds. 30 means 3 seconds.

<go> element opens a new URL, in this case it opens the second card "menu".

<do> element is used as a navigational help. With the help of do-element user can start a action on the displayed card. Some of the uses of do-element are-

Jump to previous page: 

<do type="prev" title="Back">
  <prev/>
</do>

Jump to main page:
<do type="accept" title="Main">
  <go href="index.wml"></go>
</do>

Jump to help:
<do type="help" title="Help">
  <go href="#help"></go>
</do>
      

Now try to write a program that uses three cards. First card displays some message and waits for 5 seconds and after that it displays the second card. Second card waits for 10 seconds and it passes the control to the First card.
     
  

Tutorial

    

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
Java code for media pl
java populate jsf tabl
racing
action tags in jsp
indexof
modulus operator
create xml using java
what is Ejb object
PhotoshopGreyscaletoGl
algorithm for calculat
System Independent New
Database MS Access
mysql
AJAX Interview Questio
retrive data/month/yea
setting of classpath i
Error handling in stru
Wrapper classes in jav
SYNTAX FOR JDBC
struts1.2 examples
stylesinjsp
Struts
Convert intr into a ch
JSF Tags custom
excellesen
jspvalidation
mobile Application tes
login and verifying in
Boolean
dojo free books
regular expression
java applet
networking programs
include jsf
tree and treenode (Aja
Lasso Studio for Eclip
jsf custom components
java.lang.NoClassDefFo
Cinema 4D Plugins Mete
Working with Hibernate
message
java string array add
Compressing GZIP
jQuery to Select Multi
java ChecksumCRC32 jav
array examples
if we write servlet fo
Flex Java Tutorial
div
pseudocodeofmagicsquar
expire page after clic
struts and spring
call method
learn java
datetimepickerandcssan
ascii
Easy UML Diagrams
html code for developi
java open output file
unicode charectors in
how to write to a file
add five numbers and i
login jsp
netbeans
java class
retrivedata/month/year
spring ajax
passing value from ser
laser
У?ТÐ??У?ТÐ???У?Т
how to pass same varia
JavareturnsVowelsinthe
read/write text file u
json lib/componen...]=
MurachаÐ?а???s Begin
Murachநà¯??தà¯??à®
Ч?Ð?»??Ч??Ð?«?Ч??
mysql dump
String Tokenizer
abstract.
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.