To set multiple EMML parameters / events on a single line use the following syntax: timer.setEMML("[Your EMML Tags]");

e.g. timer.setEMML("interval:value;timeout:url('JavaScript:doFunction(%json)');start");

Methods

Items listed in this section indicate methods or, in some cases, indicate parameters which will be retrieved.

NameDescriptionDefault Value
startStarts the timer. The timer will expire after an interval as specified in the 'Interval' parameterNot Started
stopStops the timer if there is currently one runningNot Started

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

NamePossible ValuesDescriptionDefault Value
interval:[Value] Values greater than or equal to 500 millisecondsThe duration the timer should run for, specified in milliseconds. This must be specified before the timer is started.1000 milliseconds (1 second)

Events

Values are returned to the caller in RhoElements via Events. Most modules contain events and those returned from this module are given below along with the event parameters. Events can cause a navigation to a new URL or a JavaScript function on the page to be invoked. Each event will in most cases have a number of parameters associated with it which will either be strings or JavaScript arrays. Event parameters can be accessed either directly or via JSON objects.


timeout

The Timeout event is triggered when the timer expires and returns the current time.

IDNameDescription
1timeThe current time from the device clock. Format is DD/MM/YY HH:MM:SS

Requirements

RhoElements Version1.0.0 or above
Supported DevicesAll supported devices.
Minimum RequirementsNone.
PersistencePartially Persistent - Changes to this module will persist when navigating to a new page with the exception of timeout event.

HTML/JavaScript Examples

The following example sets the timerinterval to 5 seconds:

<META HTTP-EQUIV="Timer" CONTENT="Interval:5000; Timeout:url('JavaScript:doTimer('%s');'); Start">

The following example shows a JavaScript alert at 10 second intervals:

<HTML>
  <HEAD>
    <META HTTP-EQUIV="Timer" CONTENT="Interval:10000; Timeout:url('JavaScript:doTimer('%s');'); Start">
  </HEAD>
  <SCRIPT LANGUAGE="javascript">
    function doTimer(time)
    {
      divTimer.innerHTML = 'Time: ' + time;
    }
  </SCRIPT>
  <BODY><DIV ID="divTimer"></DIV></BODY>
</HTML>

-->

Redirecting to TechDocs archive site...