newDFrame.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(){

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

//dFrame.addText([10, 10], 'Although positions of this Dframe are [0, 0, 100, 100]<br>parent\'s bar are not hidden')

barStyle.setHeight(20)

barStyle.setWidth(20)

var color = ['blue', 'yellow', 'green']

//add 4 x 4 bars

for (var i = 0 ; i<3 ; i++) {

barStyle.setBackgroundColor(color[i])

dFrame.addBar('', 'TOP', barStyle)

dFrame.addBar('', 'RIGHT', barStyle)

dFrame.addBar('', 'BOTTOM', barStyle)

dFrame.addBar('', 'LEFT', barStyle)

}

dFrameStyle.setBackgroundColor('red')

//Although positions of this Dframe are [0, 0, 100, 100] parent's bar will not be hidden

var dFrame = new DFrame([0, 0, 100, 100], 'added DFrame', dFrameStyle, dFrame)

dFrame.show()

}

</script>

</HEAD>

</HTML>