onLoadDFrame.html

<HTML>

<HEAD>

<script>var dFrameFilePath = '../../../../../dFrame/'</script>

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

<script language="Javascript">

//Style

DFrameAPI.include('dFrame/styles/colors/styleColors.js')

DFrameAPI.onLoad = function(){

dFrameStyle.setBordersWidth(1)

dFrameStyle.setBordersColor('black')

DFrameAPI.checkStyles(false)

var dFrame = new DFrame([10, 10, 90, 90], 'onLoadDFrame.html', dFrameStyle)

dFrame.addButton('Open a DFrame with a document', 'createDFrame("./onLoadDFrame/document.html")')

dFrame.addButton('Open a DFrame with a form', 'createDFrame("./onLoadDFrame/form.html")')

dFrame.addText([1,2], 'The onLoadDFrame function of document.html and form.html<br>are used to customize the DFrame container of those pages')

dFrame.show()

}

function createDFrame(url) {

dFrameStyle.setIndentX(40)

dFrameStyle.setIndentY(40)

var dFrame = new DFrame([30, 30, 70, 70], 'Test for onLoadDFrame', dFrameStyle)

dFrame.setURL(url)

}

</script>

</HEAD>

</HTML>

document.html

<HTML>

<HEAD>

<script>

function onLoadDFrame() {

alert('onLoadDFrame function:\nGoing to set a blue background for a document\nand update the title.')

thisDFrame.setContentBgColor('blue')

thisDFrame.setTitle('document.html')

}

</script>

</HEAD>

<BODY>

This is a document

</BODY>

form.html

<HTML>

<HEAD>

<script>

function onLoadDFrame() {

alert('onLoadDFrame function:\nGoing to set a red background for a form\nand update the title.')

thisDFrame.setContentBgColor('red')

thisDFrame.setTitle('form.html')

}

</script>

</HEAD>

<BODY BGCOLOR=BLUE>

<form Method=post Action="null action for this form"><input type=text value="This is a form"></form>

</BODY>