# Loading the JavaScript libraries

The files can be installed anywhere on a server.

The reserved variable dFrameFilePath must be set in mainPage and must indicate the dFrame directory. The path can be absolute or relative to the location of mainPage.

Example: In mainPage:

relative path: var dFrameFilePath = '../dFrame/ ';

or

absolute path: var dFrameFilePath = ' c:/server/files/dFrame/ ';

dFrameFilePath ends in one ' / ' and all the paths relating to dFrameFilePath will not have a ' / ' (example with the include method below).

As the dFrameFilePath variable will be used by the script contained in the dFrame.js file it must be set before the <include …> Javascript directive which allow then to load the dFrameAPI.js file:

var dFrameFilePath = '../dFrame/ ';

<script language="Javascript " src= "../dFrame/dFrame/lib/dFrameAPI.js"></script>

< BR>This first library will load some others by using the variable dFrameFilePath.

Other Javascript files can then be inserted whith a method of the dFrameAPI object that is automatically created during the loading of the dFrameAPI.js.

Example:

<script>DFrameAPI.include(' dFrame/ext/formBuffer.js')</script>

The path of the file of the include method must be specified according to the variable dFrameFilePath:

Example:

If dFrameFilePath was set to ' c:/server/files/dFrame/ ' the path used by dFrameAPI will be

c:/server/files/dFrame/dFrame/ext/formBuffer.js

It is recommended to read the reference documentation about dFramefilePath

Important note for developers using Netscape 4.x for tests:

This feature is not related to dFrameAPI but to a behavior of Netscape when a included file is not found: If the file specified with the include method is not found Netscape will produce the 404 - File not found error even after the path of the file has been corrected and the cache cleaned up. It is necessary to cleanup the cache, close Netscape and kill its process (not always done when Netscape is closed) before reloading the page.