activeDur Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Gets the total duration of the timeline.


[ iTime = ] currTimeState.activeDur

Possible Values

iTime Integer that receives the total duration of the timeline, in seconds.

The property is read-only. The property has no default value.


This property includes the repeatDur time and the effect of the autoReverse property, if applicable. For example, a timeline with a duration ( dur) of 5 seconds, a repeatCount of 3, and autoReverse set to true yields an activeDur of 30 seconds.


This example demonstrates how to use the activeDur property to retrieve the total duration of a timeline.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<TITLE>activeDur Property</TITLE>

function getActiveDur(){
    var aDur = t1.currTimeState.activeDur;
    alert('Total duration: ' + aDur + ' seconds.');
    .time { behavior: url(#default#time2) }

<?IMPORT namespace="t" implementation="#default#time2">


<!-- This timeline has a duration (dur) of 3 seconds, a repeatCount of 3,
    and autoReverse set to true, yielding an activeDur value of 18 seconds. -->
<t:excl id="t1" dur="3" repeatcount="3" autoreverse="true">
    <DIV ID="div1" CLASS="time" BEGIN="0" DUR="1">First line of text.</DIV>
    <DIV ID="div2" CLASS="time" BEGIN="1" DUR="1">Second line of text.</DIV>
    <DIV ID="div3" CLASS="time" BEGIN="2" DUR="1">Third line of text.</DIV>
<BUTTON id="b1" onclick="getActiveDur()">Get total duration of timeline.</BUTTON>

Code example:

Applies To


See Also

Community Additions