ontrackchange Event

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

The event fires when a track changes in a playList defined in an Advanced Stream Redirector (ASX) file.


Inline HTML <ELEMENT ontrackchange = "handler(event);" >
Event Property object.ontrackchange = handler;
attachEvent object.attachEvent( "ontrackchange", handler); Internet Explorer only
Named script <SCRIPT FOR = object EVENT = ontrackchange> Internet Explorer only

Event Information

Bubbles No
Cancels No
To invoke Change track in a playList.
Default action Calls the associated event handler.

Event Object Properties

Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query the event object for the following event properties.

Available Properties

Abstract Gets the Abstract content of the entry banner in an ASX file by using the event object.
Banner Gets the Banner content of an entry in an ASX file using the event object.
MoreInfo Gets the MoreInfo content of an entry banner in an ASX file through the event object.

Refer to the specific event object for additional event properties.


ontrackchange was introduced in Microsoft Internet Explorer 6


This is an example entry in an ASX file.

<ASX Version="1.0" PreviewMode="No" >
<title>First title</title>
    <author>Unknown 1</author>
    <abstract>WAV File</abstract>
    <ref href=""/>
    <banner href = "first_title.gif" >
        <moreinfo href = "first_title.doc" />
        <abstract>Visit the first abstract Web site</abstract>

In the following example, the ontrackchange event fires when a user changes the track in the playlist by clicking the 'Previous Track' or 'Next Track' buttons.

function trackChange(){
    banner1.innerText = event.Banner;
    bannerabstract1.innerText = event.Abstract;
    bannermoreinfo1.innerText = event.MoreInfo;
<t:media id="m1" src="/workshop/samples/author/behaviors/media/media.asx"
<B>Banner:</B>&nbsp;&nbsp;<SPAN id="banner1"></SPAN>
<B>Abstract for banner:</B>&nbsp;&nbsp;<SPAN id="bannerabstract1"></SPAN>
<B>More information on banner:</B>&nbsp;&nbsp;<SPAN id="bannermoreinfo1"></SPAN>

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

Applies To


See Also

Introduction to HTML+TIME

Community Additions