Frame And Frameset Functions - Adobe 38040334 - Dreamweaver CS3 User Manual

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

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
might return an array that contains the following strings:
"navframe"
"main_content"
DREAMWEAVER CS3
function
dom.getFrameNames()
351
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents