Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

window HTML Object

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

The window object represents a window in the browser.

Property Data type Access Description

document

Object

Read-only

Retrieves the HTML document in a given popup window.

Bb159854.note(en-us,MSDN.10).gifNote:
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.

Bb159854.note(en-us,MSDN.10).gifNote:
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.

Bb159854.note(en-us,MSDN.10).gifNote:
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.

Bb159854.note(en-us,MSDN.10).gifNote:
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.

Bb159854.note(en-us,MSDN.10).gifNote:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

Event Description

onload

Occurs immediately after the window is loaded.

Bb159854.note(en-us,MSDN.10).gifNote:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

onunload

Occurs immediately before the current window is unloaded.

Bb159854.note(en-us,MSDN.10).gifNote:
Supported only for devices running Smartphone 2002 and Pocket PC 2002 software or later.

Method Syntax Description

alert

window .alert( Message )

Displays a dialog box containing the contents of the required Message parameter.

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 setTimeout method. The required TimeoutID parameter 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 Message parameter, in addition to OK and Cancel buttons. The method returns true if the user clicks OK or false if 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 URL parameter.

prompt

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

Displays a dialog box prompting the user with a message contained in the required Message parameter and a text field. The text entered in the field is returned in TextData. DefaultValue can 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-coord is location of the pixel on the horizontal axis of the document that is to be in the upper left of the display.

y-coord is 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 Code parameter after the interval expressed in milliseconds in the Milliseconds parameter have passed. This method returns TimerID (which is used with clearTimeout). Code must be a string and cannot be a function pointer.

The following collections are supported for the window object:

Windows MobilePocket PC 2000 and later, Smartphone 2002 and later

Community Additions

Show:
© 2014 Microsoft