Click to return to the DHTML, HTML     
onpause Event     onresume Event     Default Behaviors Referen...    
Web Workshop  |  DHTML, HTML & CSS

onrepeat Event


This document describes technologies available as an experimental implementation of HTML+TIME within Internet Explorer 5. While we encourage you to evaluate these features and to send us your feedback, please note that these features are subject to change.

Fires when the timeline repeats on an element, beginning with the second iteration.

Syntax

Inline HTML <ELEMENT onrepeat = "handler" ... > All platforms
Event property object.onrepeat = handler JScript (compatible with ECMA 262 language specification) only
Named script <SCRIPT FOR = object EVENT = onrepeat> Internet Explorer only

Remarks

Bubbles No
Cancels No
To invoke Set the repeat property to a value greater than 1.
Default action Calls the associated event handler.

The event fires once for each repetition of the timeline, excluding the first full cycle. Therefore, the onrepeat event fires repeat–1 times unless it is stopped by other dependencies before completion. This event fires only if the repeat or repeatDur property is set directly on the element. This event does not fire on child elements that have the repeat or repeatDur property set only on their parent elements.

Event Object Properties

Although event handlers in the Dynamic HTML (DHTML) Object Model do not directly receive parameters, the handler can query the event object for data. For a list of properties of the event object relevant to an onrepeat event handler, click the following link.

Event Object Properties

iterationRetrieves the current iteration of the timeline's repeat cycle.
srcElementRetrieves the object that fired the event.
typeRetrieves the event name from the event object.

To access the iteration value, use the getAttribute method on the window.event object.

Example

This example displays a message box that indicates the current repeat iteration every time the onrepeat event fires on a timeline.

Sample Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<STYLE>
.time        { behavior: url(#default#time);}
</STYLE>

</HEAD>

<BODY BGCOLOR="white">
<SPAN ID="parent" CLASS=time t:BEGIN="0" t:DUR="6" t:REPEAT="4"
        t:TIMELINE="par"
    t:TIMEACTION="display" onrepeat="alert('Current iteration: ' +
    window.event.getAttribute('iteration'));">
    <SPAN CLASS=time t:BEGIN="0" t:DUR="2">This text will be
        displayed for two seconds.</SPAN><BR>
    <SPAN CLASS=time t:BEGIN="3" t:DUR="4">This text will be 
        displayed for four seconds.</SPAN>
</SPAN>
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
animation, audio, img, media, par, seq, time, video


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.