# Summary and examples

## To refer a function of mainPage:

### From mainPage: By its name:

openNewDFrame()

### From the code of a page contained in a DFrame: Back to mainPage:

mainPage.openNewDFrame()

## To refer a DFrame:

### From mainPage: by its name:

dFrame.setURL(url)

### From mainPage, in the code of an action of a Button: thisDFrame

dFrame.addButton(' text', ' thisDFrame.setURL(url) ')

### From the code of a page contained in a DFrame: Back to mainPage:

mainPage.dFrame.setURL(url)

### From the code of a page contained in a DFrame, to refer itself: thisDFrame

thisDFrame.setURL(url)

## To reach the container of a dFrame

### From mainPage: Use 'window'

dFrame.window.inlineFunction()

or

dFrame.window.document

### From the code of a page contained in a dFrame: Back to mainPage:

mainPage.dFrame.window.inlineFunction()

or

mainPage.dFrame.window.document

### From the code of a page contained in a DFrame, to refer itself: thisDFrame.window will work but can be more simply replaced by... nothing:

inlineFunction()

or

document

Example 1

file: thisDFrame.html

Run the example

See the source code

Example 2

file: topDFrame.html

Run the example

See the source code

Example 3

file: mainPageAccess.html

Run the example

See the source code

Example 4

file: newMainPageDFrame.html

Run the example

See the source code

Example 5

This is a more complex example. The 'thisDFrame' keyword is used to set (in the onLoadDFrame function, see below) and retrieve (in the 'Help' button) the help URL of documents.

file: helpSample.html

Run the example

See the source code