Home arrow HTML arrow Page 2 - Building Single Row Database Forms with HTML
HTML

Building Single Row Database Forms with HTML


Welcome to the second chapter of a thirteen part series about creating database forms with HTML. In this article, we will continue our discussion on single-row forms and explain how to send changes to the server database. We will also go over the recordset and the common functions used to manipulate the corresponding form.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
July 16, 2008
TABLE OF CONTENTS:
  1. · Building Single Row Database Forms with HTML
  2. · Sending Changes to Server Database
  3. · The Form Code
  4. · The Nature of the Recordset
  5. · The disableButtons(selectedButtons) Function

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Building Single Row Database Forms with HTML - Sending Changes to Server Database
(Page 2 of 5 )

A normal HTML FORM element has a Submit button to send the name/value pairs of the form to the server. These name/value pairs would form a row in a database table at the server. You can arrange your database program to have that also. In other words, each time you process a row, you send it to the server. The disadvantage of this method is that you will have to wait for a row to be transmitted to the server and then wait for the next row you want to work with, which is transmitted from the server to you. In this series, I only consider the case where you process a number of rows and then send the processed rows to the server.

You only send the processed rows to the server. You do not have to send all the rows of the recordset to the server. Doing this would simply be a waste of time since the non-processed rows of the client are already at the server. To achieve this, we use another table with the style property, display:none. I call this table the Transmitted Table. For any row that you process (add, edit, or delete) at the recordset, a copy is made in the Transmitted Table. It is these copies that are sent to the server. The last cell of each row in the Transmitted Table indicates whether the row is a new (added) row to the recordset, an edited row, or a deleted row. These row copies are sent to a program-file at the server. The program-file uses the indications to affect the database as required. The Transmitted Table initially has no rows.

The HTML FORM element of our form only needs this Transmitted Table, the Save button, and the Done button as its content. The Save and Done buttons are submit buttons. The HTML FORM element is a block-level element. Looking at the positions of the button in the above figure, you should realize that it is not easy to just have the Transmitted Table and the Save and Done buttons in the HTML FORM element according to the Normal Flow in HTML design. So in our HTML FORM element, the Sort and navigation buttons are included. The program-file at the server will simply ignore any name/value pairs of the Sort and Navigation buttons.


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