|
JavaScript Layer Object
The JavaScript Layer Object is a property of the document object.
Properties
- above - The layer above the current layer.
- background - The referenced layer background image.
- below - The layer below the current layer.
- bgcolor - The referenced layer background color.
- clip - The referenced layer clipping region. Attributes of the clip include:
- bottom - The Y coordinate of the bottom.
- height
- left - The X coordinate of the left side
- right
- top - The Y coordinate of the top.
- width
- document - A read only reference to the document object that exists in the layer.
- height - The height of the layer’s display area.
- layers - An array of sublayers of the referenced layer.
- left - The horizontal position of the layer relative to to the containing layer or document is determined by this value.
- name - The name of the layer.
- pageX - The layer X coordinate relative to the top level document.
- pageY - The layer Y coordinate relative to the top level document.
- parentLayer - The layer that contains the current layer.
- siblingAbove - The child layer with the same parent layer as the current layer which is above the current layer.
- siblingBelow - The child layer with the same parent layer as the current layer which is below the current layer.
- src - The URL the layer’s contents are from. This value is read/write. If this value is changed, the browser will load the contents of the URL in the layer.
- top - A read/write value that specifies the vertical position of the layer relative to the layer's containing layer.
- visibility - Determines if the layer is visible. This value can be read or written to. Possible values are:
- hide
- inherit - Inherits the visibility of the parent layer.
- show
- width - The width of the layer’s display area.
- window - The window object containing the layer.
- x- Layer X coordinate relative to the containing layer.
- y - Layer Y coordinate relative to the containing layer.
- zIndex - The layer stacking order. This value can be read or written. The layer with the higher stacking order appears on top when two layers overlap each other.
|
|
Methods
- load(source, width) - Load a new document into the current layer. A width is specified to determine when the document lines are wrapped. This should be called from an event handler.
- moveAbove(target) - Change the stacking order causing the current layer to appear on top of the target.
- moveBelow(target) - Change the stacking order causing the current layer to appear below the target.
- moveBy(x,y) - Move the layer relative to its current location.
- moveTo(x,y) - Moves the upper left corner of the layer to the specified position relative to the top level document.
- moveToAbsoluet(x, y) - Move the upper left corner of the layer to the absolute coordinates specified relative to the top level document.
- offset(movex, movey) - Move a layer X and Y coordinates relative to its present position.
- resizeBy(changewidth, changeheight) - Resize the layer by the specified number (positive or negative) of pixels for width and height.
- resizeTo(width, height) - Resize a layer to a specific width and height.
|
|