User Guide
206 Chapter 5: Fireworks JavaScript API
dom.setElementVisible()
Availability
Fireworks 4.
Usage
dom.setElementVisisble(frameIndex, layerIndex, elementIndex, bShow)
Arguments
frameIndex
An integer value that specifies the frame that contains the element(s) to be shown
or hidden, starting with
0 (although, to specify the current frame, pass –1 here).
layerIndex An integer value that specifies the layer that contains the element(s) to be shown or
hidden, starting with
0 (although, to specify the current layer, pass –1 here).
elementIndex An integer value that specifies the element(s) to show or hide, starting with 0
(although, to show or hide all the elements in the specified layer, pass
–1 here).
bShow If bShow is true, the element(s) are visible. If bShow is false, they are hidden.
Returns
Nothing.
Description
Shows or hides the specified element(s).
Example
The following command hides all the elements in the current frame and layer.
fw.getDocumentDOM().setElementVisible(-1, -1, -1, false)
See also
dom.setElementVisibleByName()
dom.setElementVisibleByName()
Availability
Fireworks 4.
Usage
dom.setElementVisibleByName(name
, bShow)
Arguments
name
A string that specifies the name of the element(s) to be shown or hidden. If more than one
element has the same name, this function shows or hides all of them.
bShow If bShow is true, the elements are visible. If bShow is false, they are hidden.
Returns
An array of the elements(s) for which visibility was set.