The Timer Meta Tag is an action tag used set a timer and register an action to be performed when the timer expires. Once the timer is started, the interval time cannot be changed without stopping and restarting the timer.
Timer (META Tag) Syntax <META HTTP-Equiv="Timer" content="[method / parameter> <META HTTP-Equiv="Timer" content="Timeout:url('[jsFunction | url]')">
Items listed in this section indicate methods or, in some cases, indicate parameters which will be retrieved.
Name Description
Default Value Start Starts the timer. The timer will expire after an interval as specified in the 'Interval' parameter Not Started Stop Stops the timer if there is currently one running Not Started
Copy methods template to clipboard: META Tags Javascript
Items listed in this section indicate parameters, or attributes which can be set.
Name Possible Values Description
Default Value Interval:[Value] Values greater than or equal to 500 milliseconds The duration the timer should run for, specified in milliseconds. N/A
Copy parameters template to clipboard: META Tags Javascript
Modules return information back to their web pages via retrieval tags, for example the scanner has a retrieval tag called 'DecodeEvent' which is called whenever it decodes a barcode. To register to receive a retrieval tag call the module as follows:
<META HTTP-Equiv="[Module]" content="[RetrievalTag]:url('[URI]')">So to register to retrieve the Scanner's DecodeEvent the following syntax would be used:<META HTTP-Equiv="Scanner" content="DecodeEvent:url('Javascript:doScan('%6', '%s', %3, '%2');')">Retrieval tags return information by replacing the text in place holders, defined as '%s' or '%<number>'. Each place holder represents 1 return value with '%s' being populated sequentially or '%<number>' providing direct acces to the desired value.
If the content for the Scanner's DecodeEvent is:
"url('Javascript:doScan('%6', '%s', %3, '%2');')"
The function would be called as follows:"Javascript:doScan('Decode', '5449000053879', 0x35, 'SCN:EAN13');"
TimeoutThe Timeout event is triggered when the timer expires and returns the current time.
ID Name Description 1 Time The current time from the deivce clock. Format is DD/MM/YY HH:MM:SS
Copy this return value template to clipboard: META Tags Javascript
The following example sets the timerinterval to 5 seconds:
<META HTTP-EQUIV="Timer" CONTENT="Interval:5000; Timeout:url('Javascript:doTimer('%s');'); Start">
Copy example to clipboard 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>
Copy example to clipboard
GeneralOnce the timer has started, it will fire repeatedly until either stop is called or a page navigation occurs.
Supported Platforms Windows CE, Windows Mobile Persistence This tag only applies to the current page. Min. Requirements None.