addButtonImage.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/blue/styleBlue.js')

DFrameAPI.onLoad = function(){

//DFrameAPI.preLoadImagesForButtonImage for 'Close' and 'Home' images is in styleBlue.js

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

dFrame.addText([10, 10], '2 ButtonImages with the use of the preloaded feature.')

//Create the default bar and add Buttons

dFrame.addButtonImage('Close', 'thisDFrame.closeFrame()')

dFrame.addButtonImage('Home', 'alert("You should go home.")')

dFrame.show()

}

</script>

</HEAD>

</HTML>

styleBlue.js

…

DFrameAPI.preLoadImagesForButtonImage('Home', 'dFrame/Styles/blue/','home.gif', 'homeOver.gif', 'homeOver.gif', 'homeOver.gif')

DFrameAPI.preLoadImagesForButtonImage('Close', 'dFrame/Styles/blue/','close.gif', 'closeOver.gif', 'close.gif', 'closeOver.gif')

…