topDFrame.html
<HTML>
<HTML>
<HEAD>
<script>var
dFrameFilePath = '../../../'</script>
<script
language="Javascript"
src="../../../lib/dFrameAPI.js"></script>
<script
language="Javascript">
//Style
DFrameAPI.include('styles/windows/styleWindows.js')
//globals
var dFrameLeft
DFrameAPI.onLoad = function(){
//Create the first dFrame
baseAll = new DFrame([0, 0, 100, 100], topDFrame.html',
dFrameStyle);
baseAll.addButton('Insert a page',
'insertPageInLeftFrame()');
baseAll.addText([60,3], 'The Close button on the Tool bar
always concern<br>the DFrame on top of the screen.' )
commonActionBar = baseAll.addBar([60, 10,'*','*'])
commonActionBar.addButton('Close','topDFrame.closeFrame()')
commonActionBar.addTitleBar('Tool bar')
baseAll.show()
}
function
insertPageInLeftFrame() {
if (!dFrameLeft) {
dFrameLeft = new DFrame([0, 0, 30, 100], 'leftPage.html',
dFrameStyle, baseAll);
dFrameLeft.setContentBgColor(false)
dFrameLeft.setTarget('openRightPage()')
dFrameLeft.setMultipleTarget(true)
}
dFrameLeft.setURL('./application/leftPage.html')
}
function openRightPage() {
var key = 'keyForRightDFrame'
var dFrame = DFrameCollector.find(key)
if ( !dFrame ) {
dFrame = new DFrame([40, 20, 70, 50], 'Right Frame',
dFrameStyle, baseAll);
DFrameCollector.register(dFrame, key)
}
return dFrame
}
</script>
</HEAD>
</HTML>