Adobe 38040334 API Reference - Page 356
Frame and frameset functions, dom.getFrameNames
![]() |
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 356 highlights
DREAMWEAVER CS3 351 API Reference Returns Nothing. Example The following example makes sure there are no more than 16 colors specified as div background colors and, if so, sets the colors used as background colors to shades of gray: var currentDOM = dw.getDocumentDOM(); var divColors = currentDOM.getDivBackgroundColors("divs"); var shadesOfGray = new Array["#000000", "#111111", "#222222", "#333333",¬ "#444444", "#555555", "#666666", "#777777", "#888888", "#999999", ¬ "#AAAAAA", "#BBBBBB", "#CCCCCC", "#DDDDDD", "#EEEEEE", "#FFFFFF"]¬ var howManyColors = divColors.length; if howManyColors
![](/manual_guide/products/adobe-38040334-api-reference-b593776/356.png)
DREAMWEAVER CS3
API Reference
351
Returns
Nothing.
Example
The following example makes sure there are no more than 16 colors specified as div background colors and, if so,
sets the colors used as background colors to shades of gray:
var currentDOM = dw.getDocumentDOM();
var divColors = currentDOM.getDivBackgroundColors("divs");
var shadesOfGray = new Array["#000000", "#111111", "#222222", "#333333",¬
"#444444", "#555555", "#666666", "#777777", "#888888", "#999999", ¬
"#AAAAAA", "#BBBBBB", "#CCCCCC", "#DDDDDD", "#EEEEEE", "#FFFFFF"]¬
var howManyColors = divColors.length;
if howManyColors <= 16{
for (var i = 0; i < howManyColors; i++)
{
currentDOM.setDivBackgroundColors("divs", shadeOfGray[i]);
}
Frame and frameset functions
Frame and frameset functions handle two tasks: getting the names of the frames in a frameset and splitting a frame
in two.
dom.getFrameNames()
Availability
Dreamweaver 3.
Description
Gets a list of all the named frames in the frameset.
Arguments
None.
Returns
An array of strings where each string is the name of a frame in the current frameset. Any unnamed frames are
skipped. If none of the frames in the frameset is named, an empty array returns.
Example
For a document that contains four frames (two of which are named), a call to the
dom.getFrameNames()
function
might return an array that contains the following strings:
•
"navframe"
•
"main_content"