Library tutorials & articles

Wireless Markup Language (WML) Tutorial

The Timer Element

The ontimer attribute of the card element may be used with the timer element to automatically move to a new card after a predefined time. The ontimer attribute is assigned the name of the card to go to when the timer expires.

The timer element has a value attribute that determines how long to wait before the timer expires. The time is specified in 1/10ths of a second, therefore a value of ten will be approximately 1 second. Each card may only have a single timer element.

The following example has three cards. The first card has an ontimer event, set to expire after 3 seconds where it automatically moves to the next card. The next card also has an ontimer event that expires after 3 seconds to move automatically to the final card.

timer.wml

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="start" title="1" ontimer="#intro">
<timer value="30"/>
<p align="center">
    You're Always<br/>
    <big>Welcome</big><br/>
    at
</p>
</card>
<card id="intro" title="2" ontimer="#index">
<timer value="30"/>
<p align="center">
    Juicy Studio<br/>
    W@P
</p>
</card>
<card id="index" title="Juicy Studio">
<p align="center">
    The answer's @ Juicy Studio<br/>
    W@P.
</p>
</card>
</wml>

Output From Program

The following shows the cards in the order they appear at 3 second intervals.

The image shows the screen of a mobile phone with the output from the program, with three cards appearing in sequence controlled by the Timer

Comments

  1. 19 Jul 2005 at 12:13

    hi
            I am Jagannath working as Sr.Programmer in Med Write India Ltd. I have one doubt that how to search the latest modified file on the stipulated time and date.If you will help me then i will be happy


    Bye
    Jagannath
    my alternate email address is b_jagan03@yahoo.co.in
    Phno : 09849654314



  2. 16 Feb 2004 at 00:49

    Nice articlae but require more info on this

  3. 01 Jan 1999 at 00:00

    This thread is for discussions of Wireless Markup Language (WML) Tutorial.

Leave a comment

Sign in or Join us (it's free).

Gez Lemon I'm available for contract work. Please visit Juicify for details.

Related podcasts

  • EarthClassMail.com - Moving from LAMP to .NET 3.5

    Scott chats with Matt Davis, architect at EarthClassMail.com, about their move from a LAMP stack (Linux/Apache/mysql/PHP) to .NET 3.5. What's working, what's not, and what kinds of issues are they running into as their architect their solution.

Events coming up

  • Dec 3

    The Auckland PHP December meetup

    Auckland, New Zealand

    Topic: Magento E-Commerce platform Speaker: Robert Popovic, LERO9, Robert is the Technical Director and co-founder of LERO9. Robert attended the Electrotechnical Faculty at The University of Belgrade where he graduated with a Masters in Computer Science and Information Technology. Robert has worked exclusively in the field of web and software development throughout his career.

Want to stay in touch with what's going on? Follow us on twitter!