Partilhar via


timeParent Property

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

Gets the parent time container element of the current element.

Syntax

HTML N/A
Scripting [ oParent = ] object.timeParent

Possible Values

oParent Object that receives the parent time container element.

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

Remarks

The timeParent property returns an ITIMEElement object, which can be used to get timing properties and to navigate the Introduction to HTML+TIME object model. It does not return an IHTMLElement, which is used to get HTML properties, such as id, style, and so on.

Example

This example demonstrates how to get the duration (dur) of the parent time container element and how to set the duration (dur) from indefinite to 30 seconds.

...
<SCRIPT>
window.onload = fnOnLoad;
function fnOnLoad()
{
    // Set up a timer to watch the time values.
    window.setInterval(fnUpdateTimes,100);
}
function fnUpdateTimes()
{
    oParent = t1.timeParent;
    span1.innerText = oParent.dur;
}
</SCRIPT>
...
<DIV id="div1" class="time"
    style="position:relative;top:25px;left:100px;height:100px;width:100px;
        background-color:blue;"></DIV>
<!-- t:EXCL is the parent time container for the t1 element. -->
<t:EXCL class="time" begin="0" dur="indefinite">
    <!-- Child element of t:EXCL time container. -->
    <t:ANIMATEMOTION id="t1" targetElement="div1" to="375,0" begin="0" dur="3"
        autoReverse="true" repeatCount="indefinite"/>
</t:EXCL>
...
<BUTTON onclick="oParent.dur='30s';">Set parent duration</BUTTON>

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/timeparent.htm

Applies To

t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO

See Also

Introduction to HTML+TIME, timeAll, timeChildren