showHelp
Methods Reference

showHelp

Description

Displays a Help file. This method can be used with WinHelp or with HTMLHelp.

Syntax

object.showHelp(URL [, arguments])

ParameterDescription
URL String specifying the URL of the document to display.
contextID Optional. Identifier of a help context ID in a Help file. Required if displaying an .hlp file.
features Optional. String specifying the dialog box used to display the Help content. Valid value includes "popup." Default value will display the Help content in the browser window.

Return Value

No return value.

Remarks

When implementing this method, a second Help dialog box will appear if the user presses the F1 key or clicks Help from the menu bar. You can prevent the default Help dialog box from appearing by setting window.event.returnValue=false.

Applies To

window


showModalDialog

Description

Creates a dialog box and displays in it the HTML document given by URL. The dialog box is a special window that is modal, meaning it retains the input focus until the user closes it.

Syntax

variant = object.showModalDialog(URL [, arguments [, features]])

ParameterDescription
URL String specifying the URL of the document to load and display. While an empty string is accepted (""), it should be noted that this is useless since once a modal dialog has been opened, it cannot be accessed by the page that opened it.
arguments Optional. Variant specifying the arguments to use when displaying the document. This parameter can be used to pass a value of any type including an array of values. The dialog can extract the values passed by the caller from the dialogArguments property of the window object.
features Optional. String specifying the window ornaments for the dialog box. It can be a combination of the following values.
Syntax Description
dialogWidth:number Sets the width of the dialog window.
dialogHeight:number Sets the height of the dialog window.
dialogTop:number Sets the top position of the dialog window relative to the upper-left corner of the desktop.
dialogLeft:number Sets the left position of the dialog window relative to the upper-left corner of the desktop.
center:{yes | no | 1 | 0 } Specifies whether to center the dialog window within the desktop. Default is yes.

Return Value

Returns a number, string, or other value. This is equal to the value of the returnValue property as set by the document given by URL.

Remarks

The default font settings should be set in the same way CSS attributes are set; for example, "font:3;font-size:4". To define multiple font values, use multiple font attributes.

Applies To

window


start

Description

Begins scrolling the marquee.

Syntax

object.start( )

Return Value

No return value.

Remarks

The onstart event must be implicitly set.

Applies To

MARQUEE


stop

Description

Stops the marquee scrolling.

Syntax

object.stop( )

Return Value

No return value.

Applies To

MARQUEE


submit

Description

Submits the form and fires the onsubmit event.

Syntax

object.submit( )

Return Value

No return value.

Applies To

FORM

See Also

INPUT, reset


tags

Description

Retrieves a collection of all elements in the given collection that have the given HTML tag name.

Syntax

elements = object.tags(tag)

ParameterDescription
tag String specifying the name of an HTML tag. It can be the name of any one of the elements listed in Objects.

Return Value

Returns a collection of element objects if successful, or null otherwise.

Remarks

This method returns an empty collection if no elements having the given name are found. Use the length property on the collection to determine the number of elements it contains.

Example

The following JScript example retrieves a collection of all P elements in the document, then applies an underline to each.

var coll = document.all.tags("P");
if (coll!=null) {
    for (i=0; i<coll.length; i++) 
	coll[i].style.textDecoration="underline";
}

Applies To

all, anchors, applets, areas, embeds, forms, images, links, plugins, scripts, styleSheets


taintEnabled

Description

Returns whether data tainting is enabled.

Syntax

object.taintEnabled( )

Return Value

Always returns FALSE for Internet Explorer 4.0. Data tainting is not supported.

Applies To

navigator


write

Description

Writes one or more HTML expressions to a document in the specified window.

Syntax

object.write(string)

ParameterDescription
string String specifying the text and/or HTML tags to write.

Return Value

No return value.

Applies To

document


writeln

Description

Writes one or more HTML expressions to a document in the specified window, followed by a carriage return.

Syntax

object.writeln(string)

ParameterDescription
string String specifying the text and/or HTML tags to write.

Return Value

No return value.

Remarks

In HTML, the carriage return is ignored unless within preformatted text.

Applies To

document


zOrder

Description

Sets the z-index for positions.

Syntax

object.zOrder([position])

ParameterDescription
position (Variant) Can be an integer value specifying the z-order as an absolute value, or one of these string values:
Front Sends the item to the front of the z-order.
Back Sends the item to the back of the z-order.

Remarks

If no position is given, the default is Front. This method applies to all positioned elements.

Applies To

APPLET, BUTTON, CAPTION, DIV, EMBED, HR, IMG, INPUT (all types except hidden), MARQUEE, OBJECT, SPAN, TD, TEXTAREA

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