Home arrow HTML arrow Page 2 - Using a 3D HTML Table as a Recordset
HTML

Using a 3D HTML Table as a Recordset


The HTML specification does not give an HTML element for a 3D table. There are, however, several ways of designing a 3D table. Last week's article showed you my own way of doing so. I strongly advise you to read that one first, before you read this one, which will go into greater detail and show you how to manipulate a 3D HTML table.

Author Info:
By: Chrysanthus Forcha
Rating: 3 stars3 stars3 stars3 stars3 stars / 2
November 18, 2008
TABLE OF CONTENTS:
  1. · Using a 3D HTML Table as a Recordset
  2. · The CSS Display Property
  3. · Experience with a 3D Recordset
  4. · Code Explanation

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using a 3D HTML Table as a Recordset - The CSS Display Property
(Page 2 of 4 )

The 3D recordset is a table. If you want its content to be seen, you should give the value of "block" to its CSS display property. If you do not want its content to be seen, you should give the value of "none" to its CSS display property.

Minimum Requirements of a Read/Write 2D Recordset

A 2D 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.


Minimum Requirements of a 3D Read/Write Recordset

Thinking logically from the above requirements, as a minimum, a 3D recordset should have the following functions:

  • A function to give the total number of horizontal and/or vertical planes of the recordset.

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

  • A function to edit data in a cell, row or plane.

  • A function to delete a plane.

  • A function to add a plane.

 I will address these five points in this article as they concern a 3D HTML table.

Regular 3D Recordset

For a regular (rectangular) 2D recordset, if you delete a row or a column, the recordset remains regular. For a regular 3D recordset (cuboid), if you delete a row or a column the recordset becomes irregular (no longer a cuboid).

Some DOM Features

We can carry out all the above functions and more, thanks to some DOM features. Here they are.

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.


The 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 into a table row.

TableCell Object Properties

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


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