getContent.html

<HTML>

<HEAD>

<script>var dFrameFilePath = '../../../'</script>

<script language="Javascript" src="../../../lib/dFrameAPI.js"></script>

<script language="Javascript">

//Style

DFrameAPI.include('styles/colors/styleColors.js')

//Global

var baseAll

DFrameAPI.onLoad = function(){

styleForText = new ButtonStyle(buttonStyle)

styleForText.setBordersWidth(0)

baseAll = new DFrame([5, 5, 95, 50], 'getContent.html', dFrameStyle)

baseAll.addText('A DFrame loads a page and the other one \'alerts\' the content of the same page.', styleForText, [5, 5])

baseAll.show()

var dFrame = new DFrame([10, 20, 45, 95], 'setURL(...)', dFrameStyle, baseAll)

dFrame.setURL('./getContent/document.html')

DFrameAPI.getContent('./getContent/document.html')

}

DFrameAPI.onContentLoad = function(c) {

var bgColor = dFrameStyle.getContentBgColor()

var dFrame = new DFrame([55, 20, 90, 95], 'getContent(...) + alert()', dFrameStyle, baseAll)

dFrame.setMessageBgColor(bgColor)

dFrame.alert(c)

}

</script>

</HEAD>

</HTML>