1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
5 <title>Insert Table
</title>
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
7 <script language=
"JavaScript" type=
"text/javascript">
10 var widthType
= (document
.tableForm
.widthType
.value
== "pixels") ? "" : "%";
11 var html
= '<table border="' + document
.tableForm
.border
.value
+ '" cellpadding="' + document
.tableForm
.padding
.value
+ '" ';
13 html
+= 'cellspacing="' + document
.tableForm
.spacing
.value
+ '" width="' + document
.tableForm
.width
.value
+ widthType
+ '">\n';
14 for (var rows
= 0; rows
< document
.tableForm
.rows
.value
; rows
++) {
16 for (cols
= 0; cols
< document
.tableForm
.columns
.value
; cols
++) {
17 html
+= "<td> </td>\n";
23 window
.opener
.insertHTML(html
);
30 <body style=
"margin: 10px; background: #D3D3D3;">
32 <form name=
"tableForm">
33 <table cellpadding=
"4" cellspacing=
"0" border=
"0">
35 <td align=
"right">Rows:
</td>
36 <td><input name=
"rows" type=
"text" id=
"rows" value=
"2" size=
"4"></td>
37 <td align=
"left">Columns:
<input name=
"columns" type=
"text" id=
"columns" value=
"2" size=
"4"></td>
40 <td align=
"right">Table width:
</td>
41 <td><input name=
"width" type=
"text" id=
"width" value=
"100" size=
"4"></td>
43 <select name=
"widthType" id=
"widthType">
44 <option value=
"pixels">pixels
</option>
45 <option value=
"percent" selected
>percent
</option>
50 <td align=
"right">Border thickness:
</td>
51 <td><input name=
"border" type=
"text" id=
"border" value=
"1" size=
"4"></td>
52 <td align=
"left">pixels
</td>
55 <td align=
"right">Cell padding:
</td>
56 <td><input name=
"padding" type=
"text" id=
"padding" value=
"4" size=
"4"></td>
57 <td>Cell spacing:
<input name=
"spacing" type=
"text" id=
"0" value=
"0" size=
"4"></td>
60 <td colspan=
"3" align=
"center">
61 <input type=
"button" value=
"Insert Table" onClick=
"AddTable();" />
62 <input type=
"button" value=
"Cancel" onClick=
"window.close();" />