Client-side object | |
Implemented in | Navigator 4.0 |
LAYER
or ILAYER
tag, or using cascading style sheet syntax. The JavaScript runtime engine creates a Layer
object corresponding to each layer in your document. It puts these objects in an array in the document.layers
property. You access a Layer
object by indexing this array.For a complete description of layers, see Dynamic HTML in Netscape Communicator1.
Some layer
properties can be directly modified by assignment; for example,
"mylayer.visibility = hide
". A layer object also has methods that can
affect these properties.
onMouseDown
and onMouseUp
events at the level of the layer and process them as you want. See "Events in Navigator 4.0" for more details about capturing events.
layer
object above this one in z-order, among all layers in the document or the enclosing window object if this layer is topmost.
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
src
attribute is a URL that indicates the image to use to provide a tiled backdrop. The value is null if the layer has no backdrop. For example:layer.background.src = "fishbg.gif";
Property of |
Layer
|
Implemented in | Navigator 4.0 |
bgColor
property is expressed as a hexadecimal RGB triplet or as one of the string literals listed in the JavaScript Guide. This property is the JavaScript reflection of the BGCOLOR
attribute of the BODY
tag.
You can set the bgColor
property at any time.
myLayer
layer's canvas to aqua using a string literal:myLayer.bgColor="aqua"The following example sets the background color of the
myLayer
layer's canvas to aqua using a hexadecimal triplet:myLayer.bgColor="00FFFF"
Layer.bgColor
layer
object below this one in z-order, among all layers in the document or null if this layer is at the bottom.
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
layer
object contains its own document
object. This object can be used to access the images, applets, embeds, links, anchors and layers that are contained within the layer. Methods of the document
object can also be invoked to change the contents of the layer.
Property of |
Layer
|
Implemented in | Navigator 4.0 |
ID
attribute in the LAYER
tag.
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Implemented in | Navigator 4.0 |
layer
object that contains this layer, or the enclosing window
object if this layer is not nested in another layer.
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
layer
object below this one in z-order, among all layers that share the same parent layer or null if layer is at the bottom.
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
SRC
attribute.
Property of |
Layer
|
Implemented in | Navigator 4.0 |
top
property is a synonym for the topmost Navigator window, which is a document window or web browser window.
Property of |
Layer
|
Read-only | |
Implemented in | Navigator 4.0 |
top
property refers to the topmost window that contains frames or nested framesets. Use the top
property to refer to this ancestor window.
The value of the top
property is
<object objectReference>
where objectReference
is an internal reference.top.close()
closes the topmost ancestor window.
The statement top.length
specifies the number of frames contained within the topmost ancestor window. When the topmost ancestor is defined as follows, top.length
returns three:
<FRAMESET COLS="30%,40%,30%">
<FRAME SRC=child1.htm NAME="childFrame1">
<FRAME SRC=child2.htm NAME="childFrame2">
<FRAME SRC=child3.htm NAME="childFrame3">
</FRAMESET>
Property of |
Layer
|
Implemented in | Navigator 4.0 |
show
means show the layer; hide
means hide the layer; inherit
means inherit the visibility of the parent layer.
Method of |
Layer
|
Implemented in | Navigator 4.0 |
zIndex
must be 0 or a positive integer.
Method of |
Layer
|
Implemented in | Navigator 4.0 |
captureEvents(eventType)
eventType |
Type of event to be captured. Available event types are listed with event .
|
captureEvents
in a signed script and precede it with enableExternalCapture
. For more information and an example, see enableExternalCapture
.
captureEvents
works in tandem with releaseEvents
, routeEvent
, and handleEvent
. For more information, see "Events in Navigator 4.0".
Method of |
Layer
|
Implemented in | Navigator 4.0 |
handleEvent(event)
event | Name of an event for which the specified object has an event handler. |
handleEvent
works in tandem with captureEvents
, releaseEvents
, and routeEvent
. For more information, see "Events in Navigator 4.0".
Method of |
Layer
|
Implemented in | Navigator 4.0 |
load(sourcestring, width)
sourcestring | A string indicating the external file name. |
width | The width of the layer as a pixel value. |
Method of |
Layer
|
Implemented in | Navigator 4.0 |
moveAbove(aLayer)
aLayer | The layer above which to move the current layer. |
Method of |
Layer
|
Implemented in | Navigator 4.0 |
moveBelow(aLayer)
aLayer | The layer below which to move the current layer. |
Method of |
Layer
|
Implemented in | Navigator 4.0 |
moveBy(horizontal, vertical)
horizontal | The number of pixels by which to move the layer horizontally. |
vertical | The number of pixels by which to move the layer vertically. |
Method of |
Layer
|
Implemented in | Navigator 4.0 |
moveTo(x-coordinate, y-coordinate)
x-coordinate | An integer representing the top edge of the window in screen coordinates. |
y-coordinate | An integer representing the left edge of the window in screen coordinates. |
moveTo
method in a signed script. For information on security in Navigator 4.0, see Chapter 7, "JavaScript Security," in the JavaScript Guide.Layer.moveBy
Method of |
Layer
|
Implemented in | Navigator 4.0 |
moveToAbsolute(x, y)
x | An integer representing the top edge of the window in pixel coordinates. |
y | An integer representing the left edge of the window in pixel coordinates. |
pageX
and pageY
properties of the layer
object.
Method of |
Layer
|
Implemented in | Navigator 4.0 |
releaseEvents(eventType)
eventType | Type of event to be captured. |
releaseEvents
works in tandem with captureEvents
, routeEvent
, and handleEvent
. For more information, see "Events in Navigator 4.0".
Method of |
Layer
|
Implemented in | Navigator 4.0 |
resizeBy(width, height)
width | The number of pixels by which to resize the layer horizontally. |
height | The number of pixels by which to resize the layer vertically. |
width
and height
to clip.width
and clip.height
.
Method of |
Layer
|
Implemented in | Navigator 4.0 |
resizeBy(width, height)
width | An integer representing the layer's width in pixels. |
height | An integer representing the layer's height in pixels. |
clip.width
and clip.height
.
Method of |
Layer
|
Implemented in | Navigator 4.0 |
routeEvent(event)
event | The event to route. |
routeEvent
works in tandem with captureEvents
, releaseEvents
, and handleEvent
. For more information, see "Events in Navigator 4.0".
Last Updated: 10/31/97 12:31:11