Home arrow HTML arrow Page 2 - Introduction to Database Forms with HTML
HTML

Introduction to Database Forms with HTML


This article is written for those who have basic knowledge of database programming, HTML, CSS and JavaScript. It is the first article in a 13-part series that explains how to build database forms with HTML. There are a number of advantages to this approach, which I will enumerate in the article. Let's get started.

Author Info:
By: Chrysanthus Forcha
Rating: 4 stars4 stars4 stars4 stars4 stars / 9
July 09, 2008
TABLE OF CONTENTS:
  1. · Introduction to Database Forms with HTML
  2. · Recordset
  3. · Programming Language
  4. · Single-Row Forms

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Introduction to Database Forms with HTML - Recordset
(Page 2 of 4 )

Recordset is a name given to the result of a database query. There are other names for it, such as resultSet. This result is in the memory of the client's computer. For a language like C++, there are APIs, which link the database program (code to manipulate the data) to the database engine. These APIs have (produce) the recordset, which is accessed by the programming language (C++).

If we use JavaScript as the programming language, what recordset shall we use? JavaScript offers a two-dimensional array whose columns can be of different data types. The problem here is that the JavaScript two-dimensional array is not well developed. It does not have the properties and methods that classical recordsets have.

Perhaps we should use the HTML TABLE element. The HTML TABLE element has the properties and methods that classical recordsets have. But the HTML table and its content, by default, appears on the browser page, while the content of a classical recordset does not appear on the client's document window!

If you give the HTML Table the style property, display:none, it will not appear or occupy space on the browser's window. Seen as a recordset, the field data of a row of the TABLE element is the content of the TD element. This can be anything; it can be text, image, video or even sound. Other recordsets do not easily take (accept) non-text objects. The HTML TABLE element can be used as a recordset.

The HTML TABLE element as a recordset has the following advantages over classical recordsets:

  • It does not only have to be two-dimensional; it can be three, even four-dimensional. When it comes to dimensions, you can make it as complex as you want. However, I will not address that issue here; maybe in some other article.

  • In conjunction with HTML, you need very little code (JavaScript) to make its field value (video) appear on the browser window. With another type of recordset, in conjunction with Windows API, you need a lot of code (C++) to make the field value appear in the client's document's window. Note: studios use Windows API without you being conscious of it.

  • If you want, you can see the content of the recordset without using code. To achieve this, simply allow the HTML TABLE (recordset) with its default style of display:block; put it in a DIV element which has scroll bars. As you can see, you do not need JavaScript, C++, or Visual Basic.net to do this. There is no other type of recordset whose data values you can see in the documents window, just like that.

  • You can give the HTML TABLE recordset-field values (e.g. images) or the whole recordset, dynamic behavior using JavaScript.

For those of you who are not used to handling recordsets by hand, know that any good container can be used as a resultset. The C++ vector container, for example, can be used as a recordset in the C++ world. The HTML TABLE element is a container. It might not look like it, but it is.

If you are dealing with the Internet and you have a basic (or small) database program to write,

  • you can use HTML in place of a studio, for flexibility, and in place of Windows API for ease of work;

  • you can use JavaScript instead of C++ or Visual Basic or Perl, etc, for ease of work and because it is easily available. Its interpreter is with the browser - see below for explanation;

  • you can use the HTML TABLE element with the style property set to display:none, for Single-Row Forms (see below), or with the default style display:block for Tabular Forms (see below). HTML TABLE is easily available (in browsers).

This is simply an aspect of web development. 


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 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials