firstSample.html
<HTML>
<HEAD>
<script>var dFrameFilePath = '../../../../../dFrame/'</script>
<script language="Javascript" src="../../../../../dFrame/dFrame/lib/DFrameAPI.js"></script>
<script
language="Javascript">
//Style
DFrameAPI.include('./firstSample/firstSampleStyle.js', 'A')
DFrameAPI.onLoad = function(){
//Instanciate the first dFrame
var dFrame = new DFrame([10, 10, 90, 90], 'firstSample.html', dFrameStyle);
var txt = 'In this sample there is one Button and one Menu.'
txt += '<br>The \'File\' Button is the Button of the pop-up Menu.'
txt += '<br>A context Menu is also created.'
dFrame.addText([5,5], txt)
//add a button
dFrame.addButton('Close', 'thisDFrame.closeFrame()');
//Define a pop-up menu also used as context Menu
var popUpMenu = new Array();
popUpMenu[0] = new Array('Button', 'Button 1', 'alert("Button 1 clicked !")');
popUpMenu[1] = new Array('Button', 'Exit', 'thisDFrame.closeFrame()');
//create a buttonStyle for the button of the pop-up menu
var x = new ButtonStyle(buttonStyle)
x.setActivateOn('OVER')
//Create the menu
var menu = dFrame.addMenu(popUpMenu, null, 'File', x);
//Add a context Menu
dFrame.addContextMenu(popUpMenu);
//Create the dFrame
dFrame.show();
}
</script>
</HEAD>
</HTML>