HTML
  Home arrow HTML arrow Database Form Functions with HTML
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  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
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

Database Form Functions with HTML
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-07-23

    Table of Contents:
  • Database Form Functions with HTML
  • Text Input Controls Operation
  • The Edit Operation
  • The Code

  • 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


    Database Form Functions with HTML


    (Page 1 of 4 )

    In this third part to a 13-part series on building database forms with HTML, we take an in-depth look at the various form controls: how they work, how to code them, and why they work the way they do. We'll cover text input, editing, and more. You'll also learn about the navigation controls.

    FORM OPERATION

    This is the diagram of the form for easy reference.



    Before you add a record to the recordset, you must click the Add button; this puts you in the add-mode. Before you edit a record, you must click the Edit button; this puts you in the edit-mode. You can only type text into the text input controls when you are in the Add or Edit mode. Depending on the state of the form, some buttons are enabled and others are disabled. All this is to protect the user from accidentally changing his data. It also makes the use of the form convenient.

    The default state of the HTML Input element allows you to type in text. So we have to always put these Input controls in the read-only state to prevent the user from accidentally changing his own data.

    For information, note that any button in its default state is enabled.

    Each button has an effect only on one row of the recordset; that is, clicking any button affects only one row at a time.

    Each element in the form has an ID.

    Each button has an event associated with it. The following code segment shows the code for the Add, Edit, Delete and Clear buttons:

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

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

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

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


    More HTML Articles
    More By Chrysanthus Forcha


       · The story has to continue.Chrys
     

    HTML ARTICLES

    - 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
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...
    - Animation of Geographical Map Regions
    - Changing and Moving Pictures with CSS
    - Clickable Geographical Map Regions
    - Gradient Creation with the HR Element
    - Text on HTML Images: Do it Yourself
    - Custom Buttons in HTML







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway