HTML
  Home arrow HTML arrow Page 2 - Using the HTML Table Element as a Recordse...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Using the HTML Table Element as a Recordset
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2008-07-21

    Table of Contents:
  • Using the HTML Table Element as a Recordset
  • Minimum Requirements of a Read/Write Recordset
  • Our Illustrative Web Page
  • Editing Data
  • Add a Row

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using the HTML Table Element as a Recordset - Minimum Requirements of a Read/Write Recordset


    (Page 2 of 5 )

    A recordset should have at least the following functions:

    • A function to give the total number of rows of the recordset.

    • A function to locate a row or cell in order to access data.

    • A function to edit data in a row.

    • A function to delete a row.

    • A function to add a row.

    The HTML TABLE as a Container

    The DOM gives the HTML table properties and methods to access the cell data, rows and columns. It is because of the DOM that we can use the HTML TABLE as a container. Features of the HTML DOM Table Object we shall use are as follows:

    Table Object Collections

    cells[]: Returns an array containing each cell in a table.

    rows[]: Returns an array containing each row in a table.

    Table Object Methods

    insertRow(): Inserts a new row in a table.

    deleteRow(): Deletes a row from a table.


    Features of the HTML DOM TableRow Object we shall use are as follows:

    TableRow Object Collections

    cells[]: Returns an array containing each cell in the table row.

    TableRow Object Methods

    insertCell(): Inserts a cell in a table row.

    TableCell Object Properties

    InnerHTML: Sets or returns the HTML (cell content) between the start and end tags of a table cell.

    We shall use the following data (employee table of a company) in our illustrations:


    ID

    NAME

    DEPARTMENT

    JOB

    YEARS

    SALARY

    10

    Smith

    20

    Mgr

    8

    18357.50

    20

    Jones

    20

    Sales

    9

    18171.25

    30

    Gates

    38

    Mgr

    4

    17506.75

    40

    Bond

    38

    Sales

    6

    18006.00

    50

    Murphy

    15

    Mgr

    10

    20659.80

    More HTML Articles
    More By Chrysanthus Forcha


       · Did you know that HTML indirectly gives you a recordset? This article explains all...
       · Is this supposed to be valid HTML? It's neither XHTML (there aren't any quotes...
       · I intended to give just the important points. All what you have said can be added in...
     

    HTML ARTICLES

    - Using a 3D HTML Table as a Recordset
    - Building a 3D HTML Table
    - Maximizing and Restoring HTML Images: Layer ...
    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT