Which Document Dom; The Dreamweaver Dom; Objects, Properties, And Methods Of The Dreamweaver Dom - MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

Which document DOM?

It is important to distinguish between the DOM of the user's document and the DOM of the
extension. The information in this chapter applies to both types of Dreamweaver documents, but
the way that you reference each DOM is different.
If you are familiar with JavaScript in browsers, you can reference objects in the active document
by writing
document
objects in extension files. To reference objects in the user's document, however, you must call
dw.getDocumentDOM()
document object.
For example, to refer to the first image in the active document, you can write
dw.getDocumentDOM().images[0]
that variable in future references, as shown in the following example:
var dom = dw.getDocumentDOM(); //get the dom of the current document
var firstImg = dom.images[0];
firstImg.src = "myImages.gif";
This kind of notation is common in files throughout the Configuration folder, especially in
command files. For more information about the
dreamweaver.getDocumentDOM()

The Dreamweaver DOM

The Dreamweaver DOM contains a subset of objects, properties, and methods from the World
Wide Web Consortium (W3C) (www.w3.org/TR/REC-DOM-Level-1/) DOM Level 1, which
are combined with some properties of the Microsoft Internet Explorer 4.0 DOM.

Objects, properties, and methods of the Dreamweaver DOM

The following table lists the objects, properties, methods, and events that the Dreamweaver
DOM supports. Some properties are read-only when they are accessed as properties of a specific
object. A bullet (•) indicates properties that are read-only when they are used in the listed context.
Object
window
navigator
68
Chapter 4: The Dreamweaver Document Object Model
. (for example,
document.forms[0]
,
dw.createDocument()
. You can also store the document object in a variable and use
function in the Dreamweaver API Reference.
Properties
navigator •
document •
innerWidth •
innerHeight •
screenX •
screenY •
platform •
), the same way that you reference
, or another function that returns a user
dw.getDocumentDOM()
Methods
alert()
confirm()
escape()
unescape()
close()
setTimeout()
clearTimeout()
setInterval()
clearInterval()
resizeTo()
None
method, see the
Events
onResize
None

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents