Default Behaviors

HTML (DHTML)

Default Behaviors Reference

Internet Development Index

Introduction to DHTML Behaviors provides a means for Web developers to extend the current Microsoft® Internet Explorer object model. A number of behaviors have been implemented as part of Internet Explorer 5 and are referred to as default behaviors.

As of Internet Explorer 5.5 and later, the time2 behavior is available only in the Microsoft Win32® platform. This default behavior enables users to add timed, interactive elements to HTML pages. Using the HTML+TIME (Timed Interactive Multimedia Extensions) extensions, any HTML element can be set to appear at a given time, last for a specified duration, and repeat the action if desired.

This section contains links that provide access to the object model exposed by these default behaviors.

Behaviors

anchorClick

Enables the browser to navigate to a folder view.

anim

Defines an instance of the Microsoft DirectAnimation® viewer in an HTML document to render DirectAnimation objects and play DirectAnimation sounds.

clientCaps

Provides information about features supported by Internet Explorer, as well as a way for installing browser components on demand.

download

Downloads a file and notifies a specified callback function when the download is complete.

homePage

Contains information about a user's homepage.

httpFolder

Contains scripting features that enable browser navigation to a folder view.

mediaBar

Provides a basic user interface (UI) for locating and playing media within the browser window. The Media Bar

saveFavorite

Enables the object to persist data in a favorite Web site.

saveHistory

Enables the object to persist data in the browser history.

saveSnapshot

Enables the object to persist data when a Web page is saved.

userData

Enables the object to persist data in user data.

Objects

MediaItem

Represents a single item in a media player playlist.

PlaylistInfo

Contains information about a media player playlist.

Attributes/Properties

attributeCount

Sets or retrieves the count of the attributes associated with the media object.

availHeight

Retrieves the height of the working area of the system's screen, excluding the Microsoft Windows® taskbar.

availWidth

Retrieves the width of the working area of the system's screen, excluding the Windows taskbar.

bufferDepth

Retrieves the number of bits per pixel used for colors on the off-screen bitmap buffer.

colorDepth

Retrieves the number of bits per pixel used for colors on the destination device or buffer.

connectionType

Retrieves the type of connection in use.

cookieEnabled

Retrieves whether client-side cookies are enabled in the browser.

cpuClass

Retrieves a string representing the CPU class.

currentItem

Sets or retrieves the current media item.

disabledUI

Sets or retrieves a Boolean value that specifies whether an instance of the Media Bar? UI is disabled.

duration

Sets or retrieves the duration of the current media item.

enabled

Sets or retrieves a Boolean value that specifies whether the Media Bar player control is enabled.

expires

Sets or retrieves the expiration date of data persisted with the userData behavior.

folder

Sets or retrieves a namespace extension, address, or path.

hasNextItem

Sets or retrieves a value that indicates whether any successive items follow the current item in the playlist.

height

Retrieves the vertical resolution of the screen.

image

Sets or retrieves the DirectAnimation Image (DAImage class) displayed by the anim:DA element.

javaEnabled

Retrieves whether the Microsoft virtual machine (Microsoft VM) is enabled.

name

Sets or retrieves the name of the media.

nextItem

Sets or retrieves the next media item in a playlist, if there is one.

openState

Sets or retrieves an integer that indicates the open state of the Media Bar player.

platform

Retrieves the platform on which the browser is running.

playlistInfo

Sets or retrieves playlist information, if a playlist exists.

playState

Sets or retrieves an integer that indicates the play state of the Media Bar player.

sound

Sets or retrieves the DirectAnimation sound (DASound class) played by the anim:DA element.

sourceURL

Sets or retrieves the URL of the media.

statics

Retrieves an object containing the DAStatics class library used with DirectAnimation.

systemLanguage

Retrieves the default language that the system is running.

target

Sets or retrieves the name of a window or frame that is the target for navigation.

userLanguage

Retrieves the current user language.

width

Retrieves the horizontal resolution of the screen.

XMLDocument

Retrieves a reference to the XML Document Object Model (DOM) exposed by the object.

Methods

addComponentRequest

Adds the specified component to the queue of components to be installed.

addDABehavior

Adds a DirectAnimation behavior (DABehavior class) to the run list when the behavior is not part of the animation model.

clearComponentRequest

Clears the queue of all component download requests.

compareVersions

Compares two version numbers.

doComponentRequest

Downloads all the components that have been queued using addComponentRequest.

getAttribute

Retrieves the value of the specified attribute.

getAttributeName

Returns the name of the attribute whose index has been specified.

getComponentVersion

Retrieves the version of the specified component.

getItemInfo

Returns the value of the specified attribute for the current media.

isComponentInstalled

Retrieves whether the specified component is available.

isHomePage

Determines whether the specified URL refers to the client's home page.

load

Loads an object participating in userData persistence from a UserData store.

navigate

Navigates the window to the specified location and displays the contents in folder view.

navigateFrame

Navigates the window or frame to the specified location and displays the contents in folder view.

navigateHomePage

Navigates the browser to a user's home page.

playNext

Starts playback of the next media item in the playlist, if a playlist is present.

playURL

Loads media from a URL into the Media Bar and starts playback.

removeAttribute

Removes the specified attribute from the object.

removeDABehavior

Removes a DirectAnimation behavior (DABehavior class) added by the addDABehavior method.

save

Saves an object participating in userData persistence to a UserData store.

setAttribute

Sets the value of the specified attribute.

setHomePage

Sets a user's home page to the specified value.

startDownload

Downloads the specified file.

stop

Stops playback of the media that is currently playing.

Events

onhide

Fires when the Media Bar player is hidden.

onload

Fires from a persistent element when the page reloads.

onopenstatechange

Fires when the Media Bar player changes its open state.

onplaystatechange

Fires when the Media Bar player changes its play state.

onsave

Fires from a persisted element when the Web page is saved or bookmarked, or when the user navigates away from the page.

onshow

Fires when the Media Bar player becomes visible.