Current File : //var/wcp4/demo1812/public_html/file/private/templates.old/common/editor_button.html
<html>
<head><title>Button</title>
<style><%include editor_dialog.css%></style>
<script language=JScript>

// Global to store arguments from calling window.
returnValue = '';

function done () {
/* ---------------------------------------------------------
 * When the user hits done this fucntion is called to 
 * produce the html from the div tags. It then inserts
 * it into the edit window and closes this window.
 */
	var html = '<input';
	if (document.all.name.value) 
		html += ' name="' + document.all.name.value + '"';
	if (document.all.value.value) 
		html += ' value="' + document.all.value.value + '"';
	if (document.all.tab.value) 
		html += ' tabindex="' + document.all.tab.value  + '"';
	html += ' type=';
	if (document.all.type[2].checked) {
		html += '"reset"';
	}
	else if (document.all.type[1].checked) {
		html += '"submit"';
	}
	else {
		html += '"button"';
	}
	html += '>';
	returnValue = html;
	window.close();
}


function check_type () {
/* ---------------------------------------------------------
 * When the type radio is changed this is called to see if
 * the value in the Value/label field should be changed.
 */
	var val = document.all.value.value;
	switch (val) {
		case "Button":
		case "Submit":
		case "Reset":
			document.all.value.value = event.srcElement.id;
			break;
	}
}


</script>
</head>
<body>
<table border=0 cellpadding=3 align=center>
	<tr>
		<td>Name:</td><td><input id=name size=30></input></td>
	</tr>
	<tr>
		<td>Value/label:</td><td><input id=value size=30 value="Button"></input></td>
	</tr>
	<tr>
		<td>Button type:</td>
		<td>
			<table border=0>
				<tr>
					<td>
						<input type=radio id=Button name=type checked onclick="check_type ();"> Normal
					</td>
					<td>
						<input type=radio id=Submit name=type onclick="check_type ();"> Submit
					</td>
					<td>
						<input type=radio id=Reset name=type onclick="check_type ();"> Reset
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>Tab order:</td><td><input name=tab size=3></td>
	</tr>
</table>
<hr>
<div align=right>
	<button class=button onclick="done();">OK</button> &nbsp;
	<button class=button onclick="window.close();">Cancel</button>
</div>
</body>
</html>