deleteTFoot
Methods Reference

deleteTFoot

Description

Deletes the TFOOT element and its contents from the TABLE.

Syntax

object.deleteTFoot()

Return Value

No return value.

Remarks

The following example deletes the TFOOT element,


document.all.myTable.deleteTFoot()

Applies To

table

See Also

createTFoot, createTHead, createCaption, deleteTHead, deleteCaption


deleteTHead

Description

Deletes the THEAD element and its contents from the TABLE.

Syntax

object.deleteTHead()

Return Value

No return values.

Remarks

The following example deletes the THEAD element,


document.all.myTable.deleteTHead()

Applies To

table

See Also

createTFoot, createTHead, createCaption, deleteTFoot, deleteCaption


doReadRequest

Description

Performs the compound request accumulated in the read-requests queue. If the site does not already have read access, the user will be prompted with a list of attributes requested and can choose to allow or deny access.

Syntax

navigator.userProfile.doReadRequest(usageCode [, friendlyName [, domain [, path [, expiration]]]])

ParameterDescription
usageCode Notification for the user of the type of access requested. This usage code should be one of the 13 codes (listed below) defined by the Internet Privacy Working Group (IPWG).
friendlyName Optional. "Friendly name" of the party requesting access to private information. For security reasons, it is not enough for the user agent to display this friendly name to the end user. In addition to this friendly name, it is essential to display the URL that originates the script requesting profile access. If this script originates from a secure connection (for example, SSL), the SSL certificate can also be used to reliably identify the party requesting access.
domain and path Optional. Which pages the user's choice will apply to in the future, in addition to the current one; the specification follows the cookie standard (RFC-2109 http://www.cis.ohio-state.edu/htbin/rfc/rfc2109.html).
expiration Optional. How long the site is requesting access to these attributes. This is currently ignored by Internet Explorer.

Return Value

Returns TRUE if successful, or FALSE otherwise.

Remarks

The following table defines the usage codes.
Usage code values Meaning
0 Used for system administration.
1 Used for research and/or product development.
2 Used for completion and support of current transaction.
3 Used to customize the content and design of a site.
4 Used to improve the content of site including advertisements.
5 Used for notifying visitors about updates to the site.
6 Used for contacting visitors for marketing of services or products.
7 Used for linking other collected information.
8 Used by site for other purposes.
9 Disclosed to others for customization or improvement of the content and design of the site.
10 Disclosed to others, who may contact you, for marketing of services and/or products.
11 Disclosed to others, who may contact you, for marketing of services and/or products, but you will have the opportunity to ask a site not to do this.
12 Disclosed to others for any other purpose.

Applies To

userProfile


duplicate

Description

Returns a duplicate of the range.

Syntax

TextRange = object.duplicate( )

Return Value

Returns TextRange.

Remarks

This feature might not be available on non-Win32 platforms. See article Q172976 in the Microsoft Knowledge Base for the latest information on Internet Explorer cross-platform compatibility.

Applies To

TextRange


elementFromPoint

Description

Returns the element for the specified x and y coordinates.

Syntax

element = object.elementFromPoint(x, y)

ParameterDescription
x (Integer) X-offset, in pixels.
y (Integer) Y-offset, in pixels.

Return Value

Returns an element object.

Remarks

Coordinates are supplied in window coordinates (0,0 is the top-left corner of the window). For elementFromPoint to exhibit expected behavior, the object or element located at position (x, y) must support and respond to mouse events. MouseEventsEnabled must be 1.

Applies To

document


empty

Description

Deselects the current selection, sets the selection type to "none", and sets the item property to null.

Syntax

object.empty( )

Return Value

No return value.

Applies To

selection


execCommand

Description

Executes a command over the given selection or text range.

Syntax

Boolean = object.execCommand(command [, bool [, value]])

ParameterDescription
command String specifying the command to execute. Can be any valid command identifier.
bool Optional. Boolean value specifying whether to display a user interface if the command supports one. Can be TRUE or FALSE. If not given, defaults to FALSE.
value Optional. Variant specifying a string, number, or other value to assign. Possible values depend on command.

Return Value

Returns TRUE if the command is successful, or FALSE otherwise.

Applies To

document, TextRange

See Also

queryCommandEnabled, queryCommandIndeterm, queryCommandState, queryCommandSupported, queryCommandValue


execScript

Description

Executes the script defined for the expression parameter in the language parameter. The language defaults to JScript.

Syntax

object.execScript(expression , language)

ParameterDescription
expression String specifying the code to be executed.
language String specifying the language in which the code is executed.

Return Value

No return value.

Applies To

window


expand

Description

Expands the range so that partial units are completely contained.

Syntax

Boolean = object.expand(unit)

ParameterDescription
unit Units to move in the range. Can be one of the following:
character Expands a character.
word Expands a word. A word is a collection of characters terminated by a space or other white-space character.
sentence Expands a sentence. A sentence is a collection of words terminated by a punctuation character, such as a period.
textedit Expands to enclose the entire range.

Return Value

Returns TRUE if it successfully expands the range, or FALSE otherwise.

Remarks

This feature might not be available on non-Win32 platforms. See article Q172976 in the Microsoft Knowledge Base for the latest information on Internet Explorer cross-platform compatibility.

Example

The following example creates a range from the current selection, then uses expand to ensure that any word partially enclosed by the range becomes entirely enclosed in the range.

var rng = document.selection.createRange();
rng.expand("word");

Applies To

TextRange

See Also

collapse


findText

Description

Searches for text in the document. Positions the start and end points of the range to encompass the search string.

Syntax

Boolean = object.findText(text)

ParameterDescription
text String specifying the text to find.

Return Value

Returns TRUE if the search text is found, or FALSE otherwise.

Remarks

This feature might not be available on non-Win32 platforms. See article Q172976 in the Microsoft Knowledge Base for the latest information on Internet Explorer cross-platform compatibility.

Applies To

TextRange


focus

Description

Causes a control to receive the focus and executes the code specified by onfocus.

Syntax

object.focus( )

Return Value

No return value.

Applies To

A, APPLET, AREA, BODY, BUTTON, CAPTION, DIV, EMBED, FIELDSET, FRAME, FRAMESET, HR, IFRAME, IMG, INPUT, MARQUEE, OBJECT, SELECT, SPAN, TABLE, TD, TEXTAREA, TR, window


forward

Description

Loads the next URL in the History list.

Syntax

object.forward( )

Return Value

No return value.

Remarks

This method performs the same action as a user choosing the Forward button in the browser. The forward method is the same as history.go(1). Trying to go past the end of the history does not generate an error. Instead, you are left at the current page.

Applies To

history

See Also

back, go


getAttribute

Description

Retrieves the value of the given attribute.

Syntax

variant = object.getAttribute(attrName [, caseSensitive])

ParameterDescription
attrName String specifying the name of the attribute.
caseSensitive Optional. Boolean value specifying whether to use a case-sensitive search to locate the attribute. If TRUE, the uppercase and lowercase letters in attrName must match exactly those in the attribute name. By default, this parameter is FALSE. If the caseSensitive for setAttribute is set to TRUE and this option is set to FALSE (default), a conflict will arise.

Return Value

Returns a string, number, or Boolean value as defined by the attribute. If the attribute is not present, this method returns null.

Remarks

If two or more attributes have the same name (differing only in uppercase and lowercase letters) and caseSensitive is FALSE, this method retrieves values only for the last attribute (the last to be created with this name). All other attributes of the same name are ignored.

Applies To

A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, META, NEXTID, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR, XMP, style


getAttribute

Description

Returns the value of the named attribute. If read access for this attribute is not already available, this method simply returns the NULL string.

Syntax

navigator.userProfile.getAttribute(attributeName, attributeValue)

ParameterDescription
attributeName One of the standard vCard names (listed below); otherwise the request is ignored and nothing is returned.
attributeValue Value stored in the attributeName parameter.

Remarks

The following schema is used for the field names of the user data store. These names are specified when using the getAttribute method on the userProfile object. Please note that the format has changed from vCard_xxx to vCard.xxx and that the older format will no longer be supported.

vCard Names

vCard.Email vCard.DisplayName vCard.FirstName
vCard.LastName vCard.MiddleName vCard.Cellular
vCard.Gender* vCard.JobTitle vCard.Pager
vCard.Company vCard.Department vCard.Notes
vCard.Office vCard.Homepage vCard.Home.StreetAddress
vCard.Home.City vCard.Home.State vCard.Home.Zipcode
vCard.Home.Country vCard.Home.Phone vCard.Home.Fax
vCard.Business.StreetAddress vCard.Business.City vCard.Business.Phone
vCard.Business.Fax vCard.Business.URL vCard.Business.State
vCard.Business.Country vCard.Business.Zipcode

Note (*) asterisk denotes extensions to the vCard schema, which will be referenced as X- elements as defined in the vCard schema.

Applies To

userProfile


getBookmark

Description

Retrieves a bookmark (opaque string) that can be used with moveToBookmark to return to the same range.

Syntax

string = object.getBookmark( )

Return Value

Returns a string if successful, or null otherwise.

Remarks

This feature might not be available on non-Win32 platforms. See article Q172976 in the Microsoft Knowledge Base for the latest information on Internet Explorer cross-platform compatibility.

Applies To

TextRange


go

Description

Loads a URL in the History list.

Syntax

object.go(delta | location)

ParameterDescription
delta | location delta is an integer representing a relative position in the History list. location is a string representing all or part of a URL in the History list.

Return Value

No return value.

Remarks

Trying to go past the beginning or end of the history does not generate an error. Instead, you are left at the current page.

Applies To

history

See Also

back, forward


inRange

Description

Returns whether the specified range is within or equal to the current range.

Syntax

Boolean = object.inRange(compareRange)

ParameterDescription
compareRange (TextRange) Range object.

Return Value

Returns TRUE if within range, FALSE otherwise.

Remarks

This feature might not be available on non-Win32 platforms. See article Q172976 in the Microsoft Knowledge Base for the latest information on Internet Explorer cross-platform compatibility.

Applies To

TextRange

See Also

isEqual


insertAdjacentHTML

Description

Inserts the given HTML text into the element at the given place. If the text contains HTML tags, the method parses and formats the text as it inserts.

Syntax

object.insertAdjacentHTML(where, text)

ParameterDescription
where String specifying where to insert the HTML text. Can be one of the following:
BeforeBegin Inserts the text immediately before the element.
AfterBegin Inserts the text after the start of the element but before all other content in the element.
BeforeEnd Inserts the text immediately before the end of the element but after all other content in the element.
AfterEnd Inserts the text immediately after the end of the element.
text String specifying the HTML text to insert. The string can be a combination of text and HTML tags. This must be well-formed, valid HTML or this method fails.

Return Value

No return value.

Remarks

You cannot insert text while the document is loading. Wait for the onload event before attempting to call this method.

Applies To

A, ADDRESS, AREA, B, BASEFONT, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COMMENT, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAMESET, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OL, OPTION, P, PLAINTEXT, PRE, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TD, TEXTAREA, TH, TR, TT, U, UL, VAR, XMP

See Also

insertAdjacentText,innerHTML, outerHTML


insertAdjacentText

Description

Inserts the given text into the element at the given place. The method inserts the text as plain text.

Syntax

object.insertAdjacentText(where, text)

ParameterDescription
where String specifying where to insert the text. Can be one of the following:
BeforeBegin Inserts the text immediately before the element.
AfterBegin Inserts the text after the start of the element but before all other content in the element.
BeforeEnd Inserts the text immediately before the end of the element but after all other content in the element.
AfterEnd Inserts the text immediately after the end of the element.
text String specifying the text to insert.

Return Value

No return value.

Remarks

You cannot insert text while the document is loading. Wait for the onload event before attempting to call this method.

Applies To

A, ADDRESS, AREA, B, BASEFONT, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COMMENT, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAMESET, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OL, OPTION, P, PRE, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE, SUB, SUP, TD, TEXTAREA, TH, TR, TT, U, UL, VAR

See Also

insertAdjacentHTML,innerText,outerText

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.