Skip to Content
Real World XML
book

Real World XML

by Steven Holzner
January 2003
Beginner to intermediate content levelBeginner to intermediate
1200 pages
23h 42m
English
Peachpit Press
Content preview from Real World XML

Timers

In WML, you can use timers to perform timed actions. A timer measures a time period, and the browser undertakes some action when that period has expired. For example, if I assign a card's ontimer attribute to the ID of another card, the browser will navigate to that card when the timer finishes:

<?xml version="1.0"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 2.0//EN"
    "http://www.wapforum.org/dtd/wml20.dtd" >
<wml>
    <card id="Card1" ontimer="#card2" title="Timers">
					.
					.
					.
					</card>
    .
    .
    .

You create a timer with the <timer> element and give it a time period (measured in tenths of seconds) with the value attribute, like this, where I'm giving this card's timer a period of 10 seconds:

 <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside XML

Inside XML

Steven Holzner
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0735712867Purchase book