UP.SDK Developer's Guide
[Cover] [Previous Section] [Next Section] [Index]
Current chapter: Doing More with WML
Section 18 out of 61 total sections
, Section 6 out of 6 sections in this chapter
Using timers
The <timer>
element lets you invoke a task automatically after some period of user inactivity. Timers have a number of useful applications, including the following:
-
displaying a splash screen for 5 seconds before advancing to the next card
-
automatically updating a stock quote every 15 minutes
-
limiting the time that sensitive data is displayed on the screen
The following is a simplified synopsis of the <timer>
element:
<timer
default="value
"/>
You must specify default
values in units of 1/10 seconds--so, for example, a value of 100
equals 10 seconds. Specifying a value of 0
disables the timer.
The following example displays the text "Acme Inventory Listing" for 5 seconds. When the timer expires, the device opens the URL specified by the ontimer
attribute which, in this case, executes the Inventory.cgi
script.
<wml>
<card id="splash" ontimer="Inventory.cgi">
<timer value="50"/>
<p>
Acme Inventory Listing
</p>
</card>
</wml>
IMPORTANT
For a complete synopsis of the <timer>
element and its attributes, see the WML Language Reference.
[Cover] [Previous Section] [Next Section] [Index]
Copyright © 2000,
Phone.com Inc. All rights reserved.
Please send comments and questions to
doc-comments@corp.phone.com.