CODEBASE Attribute | codeBase Property

MS Office DHTML, HTML & CSS

CODEBASE Attribute | codeBase Property


Sets or retrieves the URL of the component.

Syntax

HTML<ELEMENT CODEBASE = sLocation ... >
Scriptingobject.codeBase [ = sLocation ]

Possible Values

sLocation String that represents the URL of the component, which can be appended with:
#Version=a,b,c,d Version of the component, where a,b,c,d are as indicated below. If the client computer has a newer version installed, no download occurs.
aHigh-order word of the major version of the component available at the specified URL.
bLow-order word of the major version of the component available at the specified URL.
cHigh-order word of the minor version of the component available at the specified URL.
dLow-order word of the minor version of the component available at the specified URL.

The property is read/write with no default value.

Remarks

Applets do not support versioning information supplied as part of the URL.

If a,b,c,d are all set to -1 (#Version=-1,-1,-1,-1), the component is downloaded from the server if the release date is later than the installation date on the client computer. If the component is installed on the client computer and the release date is the same or earlier than the installation date, only an HTTP header transaction occurs.

Example

This example uses the CODEBASE attribute to specify the download location of the Common Dialog control.

Sample Code

<OBJECT ID="CommonDialog1" WIDTH=32 HEIGHT=32
    CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
    CODEBASE="http://activex.microsoft.com/controls/vb5/comdlg32.cab
    #Version=1,0,0,0">
</OBJECT>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
APPLET, OBJECT

See Also

managing versions of a componentInternet Linkspecifying fileversion and #version for component downloadInternet Link Non-MSDN link


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.