blob: 4518cf41e8b69e43ee57150e9959bb674668b8af [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. The ASF licenses this file to You
under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. For additional information regarding
copyright in this work, please see the NOTICE file in the top level
directory of this distribution.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Insert Table</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript">
<!--
function AddTable() {
var widthType = (document.tableForm.widthType.value == "pixels") ? "" : "%";
var html = '<table border="' + document.tableForm.border.value + '" cellpadding="' + document.tableForm.padding.value + '" ';
html += 'cellspacing="' + document.tableForm.spacing.value + '" width="' + document.tableForm.width.value + widthType + '">\n';
for (var rows = 0; rows < document.tableForm.rows.value; rows++) {
html += "<tr>\n";
for (cols = 0; cols < document.tableForm.columns.value; cols++) {
html += "<td>&nbsp;</td>\n";
}
html+= "</tr>\n";
}
html += "</table>\n";
window.opener.insertHTML(html);
window.close();
}
//-->
</script>
</head>
<body style="margin: 10px; background: #D3D3D3;">
<form name="tableForm">
<table cellpadding="4" cellspacing="0" border="0">
<tr>
<td align="right">Rows:</td>
<td><input name="rows" type="text" id="rows" value="2" size="4"></td>
<td align="left">Columns: <input name="columns" type="text" id="columns" value="2" size="4"></td>
</tr>
<tr>
<td align="right">Table width:</td>
<td><input name="width" type="text" id="width" value="100" size="4"></td>
<td align="left">
<select name="widthType" id="widthType">
<option value="pixels">pixels</option>
<option value="percent" selected>percent</option>
</select>
</td>
</tr>
<tr>
<td align="right">Border thickness:</td>
<td><input name="border" type="text" id="border" value="1" size="4"></td>
<td align="left">pixels</td>
</tr>
<tr>
<td align="right">Cell padding:</td>
<td><input name="padding" type="text" id="padding" value="4" size="4"></td>
<td>Cell spacing: <input name="spacing" type="text" id="0" value="0" size="4"></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="button" value="Insert Table" onClick="AddTable();" />
<input type="button" value="Cancel" onClick="window.close();" />
</td>
</tr>
</table>
</form>
</body>
</html>