Adobe 38040334 - Dreamweaver CS3 User Manual page 313

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

Advertisement

is the containing element for which a minimum width is required.
container
Returns
An integer representing the minimum display width of the specified container, in pixels, or -1 if the element is not a
container or its minimum width cannot be determined
Example
var dom = dw.getDocumentDOM();
var myDiv = dom.getElementById('myDiv');
var props = window.getComputedStyle(myDiv);
var minW = dom.getMinDisplayWidth(myDiv);
var setW = props.width;
if (minW > setW)
alert("Depending on the browser, your content will either be \n" +
"clipped, or the container will expand beyond its set width.");
dom.getBlockElements()
elem.getBlockElements()
Availability
Dreamweaver CS3.
Description
Scans the document (or element) for descendants with an inherent or specified display value of
Arguments
None
Returns
An array of element nodes.
Example
[...]
var blocks = DOM.getBlockElements();
var dProps = null, children = null;
for (var i=0; i < blocks.length; i++){
// get the declared styles so we can see whether width
// or height have been specified explicitly
dProps = window.getDeclaredStyle(blocks[i]);
// if the block has children, border-left, and padding-bottom
// but no width or height
if (blocks[i].hasChildNodes() && |
issueUtils.hasBorder(blocks[i],null,"left") &&
(parseFloat(blocks[i].getComputedStyleProp("padding-bottom")) > 0) &&
typeof(dProps.width) == "undefined" && typeof(dProps.height) == "undefined"){
children = blocks[i].getBlockElements();
var hasLayout = false;
// loop through the block-level children to see if
// any have width or height defined. width or height on any
// of the children of the outer block will prevent the bug.
DREAMWEAVER CS3
API Reference
.
'block'
308

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents