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.
||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.
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"/>
name: Name of the variable.
<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:
|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.|
Recommend the tutorial