alert.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/background/styleBackground.js')

DFrameAPI.onLoad = function(){

dFrameStyle.setTitleBar(true)

dFrameStyle.setDragEnabled(true)

dFrameStyle.getDefaultBarStyle().setBordersVMargin(5)

dFrameStyle.getDefaultTitleBarStyle().setBordersVMargin(5)

dFrameStyle.getDefaultTitleBarStyle().setBordersWidth(1)

//Create an auto-resize DFrame

var dFrame = new DFrame([22, 22, '*', '*'], '', dFrameStyle)

dFrame.addButton('Add text', 'thisDFrame.addAlert("<b>Auto-resize</b> DFrame")')

dFrame.alert('<b>Auto-resize</b> DFrame' , 'Auto-resized')

//Create a centered DFrame

var dFrame = new DFrame(['*', '*', 25, 25], '', dFrameStyle)

dFrame.addButton('Add text', 'thisDFrame.addAlert("<b>Centered</b> DFrame")')

dFrame.alert('<b>Centered</b> DFrame', 'Centered')

//Create an Centered and auto-resize DFrame

var dFrame = new DFrame(['*', '*', '*', '*'], '', dFrameStyle)

dFrame.addButton('Add text', 'thisDFrame.addAlert("<b>Auto-resize and centered</b> DFrame")')

dFrame.alert('<b>Auto-resize and centered</b> DFrame', 'AutoResized and centered')

//Non centered/auto-resize DFrame

dFrameStyle.setScrollType('push')

var dFrame = new DFrame(['10', '19', '200', '150'], '', dFrameStyle)

dFrame.addButton('Add text', 'thisDFrame.addAlert("<b>Non centered/auto-resize</b> DFrame")')

dFrame.alert('<b>Non centered/auto-resize</b> DFrame', 'Non centered/auto-resize')

}

</script>

</HEAD>

</HTML>