Last few chapters discussed about how events are triggered by the users and how do we handle them using event handlers.
Incase if anything happens without the user explicitly having to activate a control. Then WML provides you ontimer event to handle this.
The ontimer event is happened when a card's timer counts down from one to zero, it doesn't occur if the timer is initialized to a timeout of zero.
You can bind a task to this event with the <onevent> element. Here is the syntax:
Here, a task could be <go>, <prev> or <refresh>.
A timer is defined inside a WML card with the <timer> element. It should follow the <onevent> events if they are present. (If there are no <onevent> elements, the <timer> must be the first element inside the <card>.) No more than one <timer> may be present in a card.
The <timer> element supports the following attributes:
|name||text||Sets a name for the element.|
|value||number||Specifies the timer after which timer will be expired. Timeouts are specified in units of a tenth of a second.|
|class||class_data||Sets a class name for the element.|
|id||element ID||A unique ID for the element.|
Let’s see the example showing usage of <timer> element.
When you load this program it shows you following screen:
Incase if you do not select the given Enter option then after 5 seconds then it will be directed to Welcome page and following screen will be displayed automatically.
WML Related Interview Questions
|XML Interview Questions||HTML Interview Questions|
|HTML 5 Interview Questions||Adobe Flex Interview Questions|
|Dynamic HTML Interview Questions||XHTML Interview Questions|
|Java XML Interview Questions||XMLHttpRequest (XHR) Interview Questions|
|Advanced jQuery Interview Questions||ebXML Interview Questions|
|WAP Interview Questions||Xml Publisher Interview Questions|
|Security Assertion Markup Language (Saml) Interview Questions||Windows Workflow Foundation Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.