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('../../ExamplesStyles/blue/styleBlue.js', 'A')

var dFrame

DFrameAPI.onLoad = function(){

dFrameStyle.setMessageFontFamily('Arial')

dFrameStyle.setMessageFontSize(3)

dFrameStyle.setMessageBgColor('gray')

dFrameStyle.setMessageBold(true)

dFrame = new DFrame([5, 5, 95, 95], 'Test for alert', dFrameStyle)

dFrame.addButton('add text 1 (and clean up others)', 'addText(1)')

dFrame.addButton('add text 2', 'addText(2)')

dFrame.addButton('add text 3', 'addText(3)')

dFrame.show()

}

function addText(nb) {

if (nb == 1) {

dFrame.getStyle().setMessageColor('green')

var txt = 'This text is a Javascript variable and has been sent to <br>'

txt += 'the DFrame with the alert method.<br>'

dFrame.alert(txt, 'First text')

}

if (nb == 2) {

dFrame.getStyle().setMessageColor('yellow')

var txt = 'This text is another Javascript variable and has been sent to <br>'

txt += 'the DFrame with the addAlert method.<br>'

dFrame.addAlert(txt, 'Second text')

}

if (nb == 3) {

var txt = '<font color=blue>This text is another Javascript variable.<br>'

txt += 'the blue color has been set with the &ltfont&gt tag in the text:<br>Text in alert method is HTML code.</font><br>'

dFrame.addAlert(txt, 'Third text')

}

}

</script>

</HEAD>

</HTML>