timeParent Property (t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, ...)

HTML (DHTML)

timeParent Property

Internet Development Index

Retrieves the parent time container element of the current element.

Syntax

HTMLN/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 would be used to get HTML properties such as id, style and so on.

Example

This example demonstrates how to retrieve the parent time container element's duration (dur) 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>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This property is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) Non-Microsoft link.

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