Home arrow HTML arrow Page 3 - Tabular Database Forms with HTML
HTML

Tabular Database Forms with HTML


In this eighth part to a thirteen-part series on HTML database forms, you will learn what a tabular form is, how to lay it out, and what functions you should use with it. Join us as we continue our journey.

Author Info:
By: Chrysanthus Forcha
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
August 27, 2008
TABLE OF CONTENTS:
  1. · Tabular Database Forms with HTML
  2. · The Layout
  3. · The Layout continued
  4. · The addRow() Function

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Tabular Database Forms with HTML - The Layout continued
(Page 3 of 4 )

<tr id="TR0" onclick="selectRow('TR0')"><td id="TD00"><input type="text" readonly id="EI00" value="10"></td><td id="TD01"><input type="text" readonly id="EI01" value="Smith"></td><td id="TD02"><input type="text" readonly id="EI02" value="20"></td><td id="TD03"><input type="text" readonly id="EI03" value="Mgr"></td><td id="TD04"><input type="text" readonly id="IE04" value="8"></td><td id="TD05"><input type="text" readonly id="EI05" value="18357.50"></td><td id="TD06">-1</td></tr>

<tr id="TR1" onclick="selectRow('TR1')"><td id="TD10"><input type="text" readonly id="EI10" value="20"></td><td id="TD11"><input type="text" readonly id="EI11" value="Jones"></td><td id="TD12"><input type="text" readonly id="EI12" value="20"></td><td id="TD13"><input type="text" readonly id="EI13" value="Sales"></td><td id="TD14"><input type="text" readonly id="EI14" value="9"></td><td id="TD15"><input type="text" readonly id="EI15" value="18171.25"></td><td id="TD16">-1</td></tr>

<tr id="TR2" onclick="selectRow('TR2')"><td id="TD20"><input type="text" readonly id="EI20" value="30"></td><td id="TD21"><input type="text" readonly id="EI21" value="Gates"></td><td id="TD22"><input type="text" readonly id="EI22" value="38"></td><td id="TD23"><input type="text" readonly id="EI23" value="Mgr"></td><td id="TD24"><input type="text" readonly id="EI24" value="4"></td><td id="TD25"><input type="text" readonly id="EI25" value="17506.75"></td><td id="TD26">-1</td></tr>

<tr id="TR3" onclick="selectRow('TR3')"><td id="TD30"><input type="text" readonly id="EI30" value="40"></td><td id="TD31"><input type="text" readonly id="EI31" value="Bond"></td><td id="TD32"><input type="text" readonly id="EI32" value="38"></td><td id="TD33"><input type="text" readonly id="EI33" value="Sales"></td><td id="TD34"><input type="text" readonly id="EI34" value="6"></td><td id="TD35"><input type="text" readonly id="EI35" value="18006.00"></td><td id="TD36">-1</td></tr>

<tr id="TR4" onclick="selectRow('TR4')"><td id="TD40"><input type="text" readonly id="EI40" value="50"></td><td id="TD41"><input type="text" readonly id="EI41" value="Murphy"></td><td id="TD42"><input type="text" readonly id="EI42" value="15"></td><td id="TD43"><input type="text" readonly id="EI43" value="Mgr"></td><td id="TD44"><input type="text" readonly id="EI44" value="10"></td><td id="TD45"><input type="text" readonly id="EI45" value="20659.80"></td><td id="TD46">-1</td></tr>

</tbody>

</table>

</div>

</td>

</tr>

<tr>

<td>

<br />

<form action="http://databaseSite.com/programFile.exe" method="post">

<table>

<tr>

<td colspan="7" id="TDAE1">

<button type="button" id="AE1" onclick="effectAddEdit()"> After Editing or Adding, You must Click here</button>

</td>

</tr>

<tr>

<td>

<button type="button" id="A1" onclick="addRow()"> Add </button>&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td>

<button type="button" id="E1" onclick="editRow()"> Edit </button>&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td>

<button type="button" id="D1" onclick="deleteRow()"> Delete </button>&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td>

<button type="button" id="C1" onclick="clearAdd()"> Clear </button>&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td>

<button type="button" id="So1" onclick="sort()"> Sort </button>&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td>

<button type="button" id="S1" onclick="finalize('S1')"> Save </button>&nbsp;&nbsp;&nbsp;&nbsp;

<button type="submit" id="Sa1" style="display:none"> Save </button>

</td>

<td>

<button type="button" id="Do1" onclick="finalize('Do1')"> Done </button>

<button type="submit" id="Don1" style="display:none"> Done </button>

</td>

</tr>


</table>

 

<!-- Transmitted Table -->

<table id="TransmittedTable">

</table>

 

</form>

</td>

</tr>

</table>

</td>

</tr>

</table>


</body>

The start() Function

This function is called when the page is loaded. It replaces the setFirstRow() function for our Single-Row Form. The function simply establishes the total number of rows of the recordset.

In the setFirstRow() function for our Single-Row Form we had to display the data of the first row on the form; we had to disable the Show First and Show Previous buttons and do other things. Here, all those features are not necessary. This is the function:

//the function called onload

function start()

{

//determine the total number of rows

var rowCollection = document.getElementById('Recordset').rows;

numberOfRows = rowCollection.length;

}



blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials