window HTML Object (Windows Embedded CE 6.0)

1/6/2010

The window object 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.

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.

name

String

Read/write

Sets or retrieves the name of the object.

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.

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.

Events

Event Description

onload

Occurs immediately after the window is loaded.

onunload

Occurs immediately before the current window is unloaded.

Methods

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 Embedded) 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 Embedded.

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.

Collections

The following collections are supported for the window object:

Requirements

Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Other Resources

Internet Explorer Embedded HTML Scripting Objects