CodeThatForm Creation Example

CodeThatForm Creation Example

Click to create simple window and click to create Layered Form at the current window.

Number of new forms will equal the number you've clicked the appropriate button.

You can drag these form by title.

Keep in mind that Layered Forms available just with PRO version of CodeThatForm.

Learn more about properties description and window's actions.

You can find a code of these examples below:

<HEAD>

<style>
.title
{
    FONT-WEIGHT: bolder;
    font-weight: bold;  
    FONT-SIZE: 8pt;
    FONT-FAMILY: Times New Roman;
    TEXT-ALIGN: left
}
</style>

<script language="javascript1.2" src="codethatsdk.js"></script>
<script language="javascript1.2" src="codethatform_windowed.js"></script>
<script language="javascript1.2" src="codethatform_layered.js"></script>
<script language="javascript1.2">
<!--
var w;
var html = "<table border=0 cellpadding=0 cellspacing=0 " +
	"width=100%><tr><td>" +
	"<img src='img/first_bg.gif'></td></tr></table>";

function wincreate () {
	w = new CWindow(384, 236, 50, 100,
		'CodeThatForm - windowed',
		html, '#761500', '', '', '', 0,0
	);
	w.create();
}

var w_l;
var html_layer = "<table border=0 cellpadding=0 " +
	"cellspacing=0 width=100%><tr><td>" +
	"<img src='img/first_bg.gif'></td></tr></table>";

function layercreate () {
	w_l = new CLrWindow(
		384, 236, 50, 100,
		'&nbsp;<font size="2pt" color="#F9B800">' +
		'<b>CodeThatForm - layered</b></font>',
		html_layer, '', '', '',
		[//buttons
			{
				w : 16, h : 14,
				src : 'img/orange/min.gif',
				over : 'img/orange/minovr.gif'
			}, //min
			null, //max
			{
				w : 16, h : 14,
				src : 'img/orange/close.gif',
				over : 'img/orange/closeovr.gif'
			}, // close
			{
				w : 16, h : 14,
				src : 'img/orange/rest.gif',
				over : 'img/orange/restovr.gif'
			}
			//restore
		],
		{
			bgc : '#761500', h : 22, bgi : '', css : 'title'
		},
		{
			color : '#334279', width : 1
		}, 0, 0, 2, 'Alpha(Opacity=80)'
	);
	w_l.create();
}
//-->
</script>
</head>

<body>
<form>
<p>Click <input class=btn type=button 
onclick="wincreate()" value="Create Win"> to
create simple window and click <input class=btn 
type=button onclick="layercreate()" value="Create Layer">
to create Layered Form at the current window. 
</form>
</body>
</html>