Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The windowobject represents a window in the browser.

Properties

Property Data type Access Description

document

Object

Read-only

Retrieves the HTML document in a given popup window.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

external

Object

Read/write

Sets and retrieves properties and other features made available in the object model provided by the browser's hosting application.

history

Object

Read-only

Contains information about the URLs visited by the client.

length

Long

Read-only

Retrieves the number of frames in the window.

location

Object

Read-only

Returns an object that represents the location information of the current document.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

name

String

Read/write

Sets or retrieves the name of the object.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

navigator

Object

Read-only

Contains information about the Web browser.

parent

Object

Read-only

Retrieves the parent of the window in the object hierarchy.

screen

Object

Read-only

Returns a window object, which enables you to manipulate forms according to their placement on the screen.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

self

Object

Read-only

Retrieves a reference to the current window or frame.

top

Object

Read-only

Retrieves the topmost ancestor window, which is its own parent.

window

Object

Read-only

A handle of the window-specific data and that can be any value.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

Events

Event Description

onload

Occurs immediately after the window is loaded.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

onunload

Occurs immediately before the current window is unloaded.

Note:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

Methods

Method Syntax Description

alert

window .alert( Message )

Displays a dialog box containing the contents of the required Messageparameter.

blur

window .blur

Causes the browser window (Internet Explorer Mobile) to lose focus, switching you to the previous application.

clearTimeout

window .clearTimeout( TimerID )

Cancels a time-out that was set with the setTimeoutmethod. The required TimeoutIDparameter should be set to the time-out ID that is returned from setTimeout.

close

window .close

Closes the current browser window.

confirm

Choice= window .confirm( Message )

Displays a confirmation dialog box that contains the message contained in the required Messageparameter, in addition to OKand Cancelbuttons. The method returns trueif the user clicks OKor falseif the user clicks Cancel.

focus

window .focus

Sets focus to the window.

navigate

window .navigate( URL )

Navigates the browser to the URL specified by the required URLparameter.

prompt

TextData= window .prompt( Message ,[ DefaultValue] )

Displays a dialog box prompting the user with a message contained in the required Messageparameter and a text field. The text entered in the field is returned in TextData. DefaultValuecan contain an optional default value in the text box.

scroll

 

Not supported in Internet Explorer Mobile.

scrollTo

window .scrollTo (x-coord,y-coord)

Redisplays the document.with the provided coordinates being the upper left corner of the display. There is no returned value.

x-coordis location of the pixel on the horizontal axis of the document that is to be in the upper left of the display.

y-coordis location of the pixel on the virtical axis of the document that is to be in the upper left of the display.

setTimeout

TimerID= window .xsetTimeout( Code ,  MilliSeconds )

Executed code specified by the Codeparameter after the interval expressed in milliseconds in the Millisecondsparameter have passed. This method returns TimerID(which is used with clearTimeout). Codemust be a string and cannot be a function pointer.

Collections

The following collections are supported for the windowobject:

Requirements

Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also