Adobe 38040334 API Reference - Page 313
dom.getBlockElements, elem.getBlockElements
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 313 highlights
DREAMWEAVER CS3 308 API Reference • container is the containing element for which a minimum width is required. 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 'block'. 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.