U
Objects Reference

U

Description

Renders text underlined.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

U


UL

Description

Draws lines of text as a bulleted list.

Remarks

This element is a block element.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title, type

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

UL

See Also

LI


userProfile

Description

Provides methods that allow a script to request read access to a user's profile information, and to perform read actions. Note that the request is queued up before the reading or writing action is performed, which simplifies the user's experience because he or she is only prompted for profile release permissions once for a batch of requests.

Example

The following is an example of a script that can be run on the client to read various values from the profile information.

// queue up a request for read access to multiple profile attributes
navigator.userProfile.addReadRequest("vcard.displayname");
navigator.userProfile.addReadRequest("vcard.gender");

// request access to this information
navigator.userProfile.doReadRequest(usage-code, "Acme Corporation");

// now perform read operations to access the information
name = navigator.userProfile.getAttribute("vcard.displayname");
gender = navigator.userProfile.getAttribute("vcard.gender");

// the script can now use the 'name' and 'gender' variables
// to personalize content or to send information back to the server

// this is to support getting back to a clean slate by clearing the
// request queue.
navigator.userProfile.clearRequest();

Methods

addReadRequest, clearRequest, doReadRequest, getAttribute


VAR

Description

Renders text as a small fixed-width font.

Properties

className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, insertAdjacentText, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

VAR


window

Description

Represents an open window in the browser.

Remarks

You use the window object to retrieve information about the state of the window and to gain access to the document in the window, to the events that occur in the window, and to features of the browser that affect the window.

Typically, the browser creates one window object when it opens an HTML document. However, if a document defines one or more frames (that is, contains one or more FRAME or IFRAME tags), the browser creates one window object for the original document and one additional window object for each frame. These additional objects are child windows of the original window and can be affected by actions that occur in the original. For example, closing the original window causes all child windows to close. You can also create new windows (and corresponding window objects) by using methods such as open and showModalDialog.

You can apply any window property, method, or collection to any variable or expression that evaluates to a window object, regardless of how that window was created. Additionally, you can access all window properties, methods, and collections in the current window by using the property, method, or collection name directly—that is, without prefixing it with an expression that evaluates to the current window object. However, to help make more readable code and to avoid potential ambiguities, many developers use the window keyword when accessing window properties, methods, and collections for the current window. This keyword always refers to the current window.

Note Window property, method, and collection names are reserved keywords and cannot be used as the names of variables and routines.

The dialogArguments, dialogHeight, dialogLeft, dialogTop, dialogWidth, and returnValue properties are available only for windows created using the showModalDialog method.

Examples

The following example displays an alert (message) box for the current window.

alert("A simple message.")

The following example checks whether the current window contains child windows and, if it does, displays the names of those child windows.

if (window.frames!=null) {
    for (i=0; i<window.frames.length; i++)
        window.alert("Child window "+i+" is named "+window.frames(i).name);
}

The following example shows a simple event handler function for the window's onload event. Note that, in the absence of a "window" element, the BODY element hosts the following window object events: onblur, onfocus, onload, and onunload.

<BODY onload="window.status='Page is loaded!'">

Properties

clientInformation, closed, defaultStatus, dialogArguments, dialogHeight, dialogLeft, dialogTop, dialogWidth, document, event, history, length*, location, name, navigator, offscreenBuffering, opener, parent*, returnValue, screen, self, status, top*

(*) symbol indicates properties not applicable to modal dialogs.

Collections

frames*

Methods

alert, blur, clearInterval, clearTimeout, close, confirm, execScript, focus, navigate, open*, prompt, scroll, setInterval, setTimeout, showHelp, showModalDialog*

(*) symbol indicates properties not applicable to modal dialogs.

Events

onbeforeunload, onblur, onerror, onfocus, onhelp, onload, onresize, onscroll, onunload


XMP

Description

Renders text in fixed-width type used for example text.

Remarks

This tag is no longer recommended. Instead, the PRE or SAMP tag should be used.

This element is a block element.

Properties

className, document, id, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName, title

Methods

click, contains, getAttribute, insertAdjacentHTML, removeAttribute, scrollIntoView, setAttribute

Collections

all, children, filters

Events

onclick, ondblclick, ondragstart, onfilterchange, onhelp, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselectstart

HTML Element

XMP

See Also

LISTING, PLAINTEXT, PRE, TT

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