Building Single Row Database Forms with HTML - The Form Code
(Page 3 of 5 )
The INPUT elements and buttons each have an ID. The ID of the Transmitted Table is “TransmittedTable.” The ID of the INPUT element that receives the row position of the recordset is "RowPosition." The ID of the INPUT element that receives the total number of rows is “TNumberRows.” The basic code for the form (as seen by the user) is as follows:
<table id="CT1">
<tr>
<td colspan="2">
<b>Employee Information</b>
Row <input type="text" id="RowPosition"> of <input type="text" id="TNumberRows">
</td>
</tr>
<tr>
<td width="100">
<br />
ID
</td>
<td>
<br />
<input type="text" id="EI0">
</td>
</tr>
<tr>
<td width="100">
<br />
Name
</td>
<td>
<br />
<input type="text" id="EI1">
</td>
</tr>
<tr>
<td width="100">
<br />
Department
</td>
<td>
<br />
<input type="text" id="EI2">
</td>
</tr>
<tr>
<td width="100">
<br />
Job
</td>
<td>
<br />
<input type="text" id="EI3">
</td>
</tr>
<tr>
<td width="100">
<br />
Years
</td>
<td>
<br />
<input type="text" id="EI4">
</td>
</tr>
<tr>
<td width="100">
<br />
Salary ($)
</td>
<td>
<br />
<input type="text" id="EI5">
</td>
</tr>
<tr>
<td colspan="2">
<br />
<button type="button" id="A1"> Add </button>
<button type="button" id="E1"> Edit </button>
<button type="button" id="D1"> Delete </button>
<button type="button" id="C1"> Clear </button>
<button type="button" id="F1"> Find </button> <br /><br />
<form action="http://databaseSite.com/programFile.exe" method="post">
<button type="button" id="So1"> Sort </button>
<button type="button" id="S1" type="submit"> Save </button> <br /><br />
<button type="button" id="SFA1"> |<< </button>
<button type="button" id="SP1"> << </button>
<button type="button" id="SN1"> >> </button>
<button type="button" id="SL1"> >>| </button>
<button type="button" id="Do1" type="submit"> Done </button>
<!-- Transmitted Table -->
<table id="TransmittedTable">
</table>
</form>
</td>
</tr>
</table>
Next: The Nature of the Recordset >>
More HTML Articles
More By Chrysanthus Forcha