Structure

You do not need to understand what is explained in this page to work with DFrameAPI. But a little comprehension of what are DFrames made of can help you to solve some problems.

Each of the graphical dFrameAPI objects is a DynAPI dynlayer.

The resumed tree of objects in a dFrameAPI page is the following:

For IE and NS6:

Ø       window

Ø       (1) document (mainPage)

o        HTML code (if any, not recommended)

o        Scripts objects: Javascript developper's code

o        (2) main layer (DFrame, <div> tag, DynAPI dynlayer)

§         additional layers (Bars, DynAPI dynlayer)

·                      (3) additional layers (Buttons and Menus, DynAPI dynlayer)

§         additional layer (IFrame container, not accessible by developpers, DynAPI dynlayer)

·         IFrame (containing the HTML page inserted in the DFrame)

·         (4) window

§         (5) document (the inserted HTML page)

§         HTML tags (<HEAD>, <BODY>, …

§         Forms

§         (6) Scripts

§        

For NS4

Ø       window

Ø       (1) document (mainPage)

o        HTML code (if any, not recommended)

o        Javascript developper's code

o        (2) main layer (DFrame, <ilayer> tag, DynAPI dynlayer)

§                                                                    additional layers (Bars, DynAPI dynlayer)

·         (3) additionsl layers (Buttons and Menus, DynAPI dynlayer)

§                                                                    additional layer (not accessible by developpers, DynAPI dynlayer)

·              additional layer (Scroll layer, not accessible by developpers*, DynAPI dynlayer)

·              (4) additional layer (HTML page container, <ilayer> HTML tag)

§                                            (5) document (the inserted HTML page)

·                             HTML tags (<HEAD>, <BODY>, …

·                             Forms

·                             (6) Scripts

·                            

* : The fact is that this dynlayer can be accessed thru the getScrollPane method. See DynAPI examples

The 3 dFrameAPI keywords refer to:

mainPage: Javascript code (6) in document (5) access to document (1).

In IE and NS5 a "window" in the graphical meaning is made of a DFrame, which is a layer contained in the first window object of the browser, containing a IFrame which is a second window object.

-          The Javascript code of Buttons is in the DFrame and thus is stored in the first window object and can directly access functions and values stored in mainPage.

-          The Javascript code stored in documents inserted in DFrames is stored in the second window object and thus can only access functions and values of mainPage thru the "mainPage" keyword.

thisDFrame: 2 ways of accessing the same objects:

-          Javascript (6) code in document (5) access to DFrame (2)

-          Javascript code of Buttons (3) access to DFrame (2)

window: once you have a handle on a DFrame (2) DFrame.window provides an access to a window object (4) for IE and NS6 and to a ilayer object (4) for NS4. Those 2 objects are thus quite differents and the object returned by the "window" keyword cannot be used. However DFrame.window.document provides an access to a document object (5), what is very useful.