Change Language


Follow Navioo On Twitter

Layer : Object

Layer in an HTML document.

Platform Support

IE Mozilla Netscape Opera Safari
no no 4.0+ no no

Constructors

Constructor Action IE Mozilla Netscape Opera Safari
Layer Constructor() : Layer
Creates a new instance of a Layer object.
Show Details no no 4.0+ no no

Layer() : Layer

Creates a new instance of a Layer object.

Returns

Layer
Visibility
internal

Properties

Property Action IE Mozilla Netscape Opera Safari
above : Object
Layer object directly above the current layer in the z-index order.
No Details no no 4.0+ no no
background : Object
Image displayed in the background of the layer.
No Details no no 4.0+ no no
below : Object
Layer object directly below the current layer in the z-index order.
No Details no no 4.0+ no no
bgColor : String
Background color of the layer.
No Details no no 4.0+ no no
clip.bottom : Object
Bottom edge of the clipping area of the layer, relative to layer.top.
Show Details no no 4.0+ no no
See Also

layer.top

clip.height : Object
Height of the clipping area of the layer.
Show Details no no 4.0+ no no
See Also

layer.clip.bottom

clip.left : Object
Left edge of the clipping area of the layer, relative to layer.left.
Show Details no no 4.0+ no no
See Also

layer.left

clip.right : Object
Right edge of the clipping area of the layer, relative to layer.right.
No Details no no 4.0+ no no
clip.top : Object
Top edge of the clipping area of the layer, relative to layer.top.
Show Details no no 4.0+ no no
See Also

layer.top

clip.width : Object
Width of the clipping area of the layer.
No Details no no 4.0+ no no
document : Object
Document associated with the layer.
No Details no no 4.0+ no no
hidden : Boolean
Specifies whether a layer is hidden (true) or visible (false).
No Details no no 4.0+ no no
layers : Array
Array of child layers of the current layer.
No Details no no 4.0+ no no
left : Number
Horizontal position (in pixels) of the left edge of the layer.
No Details no no 4.0+ no no
name : String
Name of the layer.
No Details no no 4.0+ no no
pageX : Number
Horizontal position (in pixels) of the layer relative to the page.
No Details no no 4.0+ no no
pageY : Number
Vertical position (in pixels) of the layer relative to the page.
No Details no no 4.0+ no no
parentLayer : Object
Parent layer of the current layer.
No Details no no 4.0+ no no
siblingAbove : Object
Layer object directly above the current layer in the z-index order that shares the same parent as the current layer.
No Details no no 4.0+ no no
siblingBelow : Object
Layer object directly below the current layer in the z-index order that shares the same parent as the current layer.
No Details no no 4.0+ no no
src : String
URL for the contents of the layer.
No Details 4.0+ no no no no
top : Number
Vertical position (in pixels) of the top edge of the layer.
No Details no no 4.0+ no no
visibility : String
Specifies whether the layer should be visible ("show"), hidden ("hide"), or inherit the visibility of the parent layer ("inherit").
No Details
window : Object
Window or frame object that contains the layer.
No Details no no 4.0+ no no
x : Object
Horizontal position (in pixels) of the left edge of the layer.
No Details no no 4.0+ no no
y : Object
Vertical position (in pixels) of the top edge of the layer.
No Details no no 4.0+ no no
zIndex : Object
Position of the layer in the z-order, relative to its sibling layers.
No Details no no 4.0+ no no

Functions

Method Action IE Mozilla Netscape Opera Safari
captureEvents() : Object
Sets the layer to capture all events of a specified type.
Show Details no no 4.0+ no no

Returns

Object
handleEvent() : Object
Calls the event handler for the specified event.
Show Details no no 4.0+ no no

Returns

Object
load(String src, Number width) : Object
Loads contents into the layer and updates the width of the layer.
Show Details no no 4.0+ no no

Parameters

String src URL for the contents of the layer.
Number width New width of the layer.

Returns

Object
See Also

Layer.src

Availability

Netscape 4 only

moveAbove(Object target) : Object
Moves the current layer above another layer.
Show Details no no 4.0+ no no

Parameters

Object target Layer to move the current layer above.

Returns

Object
moveBelow(Object target) : Object
Moves the current layer below another layer.
Show Details no no 4.0+ no no

Parameters

Object target Layer to move the current layer below.

Returns

Object
moveBy(Number dx, Number dy) : Object
Moves the layer the specified amount down and to the right.
Show Details no no 4.0+ no no

Parameters

Number dx Amount to move the layer to the right. Specify a negative value to move the layer to the left.
Number dy Amount to move the layer down. Specify a negative value to move the layer up.

Returns

Object
moveTo(Object x, Object y) : Object
Moves the layer to a specified position relative to the document or parent layer.
Show Details no no 4.0+ no no

Parameters

Object x Horizontal position (in pixels) of the left edge of the layer.
Object y Vertical position (in pixels) of the top edge of the layer.

Returns

Object
moveToAbsolute(Object x, Object y) : Object
Moves the layer to a specified position on the page.
Show Details no no 4.0+ no no

Parameters

Object x Horizontal position (in pixels) of the left edge of the layer.
Object y Vertical position (in pixels) of the top edge of the layer.

Returns

Object
Availability

Netscape 4 only

offset(Number dx, Number dy) : Object
Moves a layer down and to the right by a specified amount. Deprecated by moveBy().
Show Details no no 4.0+ no no

Parameters

Number dx Amount to move the layer to the right. Specify a negative value to move the layer to the left.
Number dy Amount to move the layer down. Specify a negative value to move the layer up.

Returns

Object
See Also

moveBy

Availability

Netscape 4 only|deprecated

releaseEvents() : Object
Sets the layer to release all captured events of a specified type.
Show Details no no 4.0+ no no

Returns

Object
resizeBy(Number dw, Number dh) : Object
Resize the layer by the specified amount.
Show Details no no 4.0+ no no

Parameters

Number dw Number of pixels to resize the layer by horizontally.
Number dh Number of pixels to resize the layer by vertically.

Returns

Object
Availability

Netscape 4 only

resizeTo(Object width, Object height) : Object
Resize the layer to a specified size.
Show Details no no 4.0+ no no

Parameters

Object width Number of pixels wide the layer should be.
Object height Number of pixels tall the layer should be.

Returns

Object
routeEvent() : Object
Routes a captured event through the event hierarchy.
Show Details no no 4.0+ no no

Returns

Object

References

Window

Availability

Netscape 4 only|discontinued in Netscape 6

text_javascript Navioo_docs

Examples -> Source code Demo online - > layer:

Ajax Javascript feed

↑ Grab this Headline Animator