You are here: Reference > HTML > attributes > data (object)

data attribute (object)

Browser support:
Sets the location of the data for an object.
JavaScript page for this attribute: data. You can find other example(s) there.

Possible values:

String that sets the URL of the data file.
The URL can be an absolute or relative path as well. If a relative path is used and the codeBase attribute of the object is specified, then the relative path is relative to the value of this attribute, else the relative path is relative to the base URL.
The base URL is the location of the current document, but it can be overridden by the base tag.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the data attribute with Macromedia Flash Player.
The codeBase attribute of the object tag is missing from this example. You can check the version of the user's Flash player with this attribute in Internet Explorer, and if it does not exist or its version is lower than required, the browser pops up an installation dialog. Unfortunately the use of the codeBase attribute causes problems in Firefox. See the codeBase attribute for details.
<object data="flash.swf" type="application/x-shockwave-flash" width="300px" height="200px"
        archive="http://archive.somePlace.com/swflash.cab#version=3,0,11,0">
        <!-- If flash player is not installed, pluginurl helps the user to download it in Firefox -->
    <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
    
    <param name="movie" value="flash.swf" />  
    <param name="bgcolor" value="#FFFFE0" />  
    <param name="quality" value="high" />
</object>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content