HTML
  Home arrow HTML arrow Page 2 - More 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  
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

More Database Form Functions with HTML
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 4
    2008-07-30

    Table of Contents:
  • More Database Form Functions with HTML
  • The showPreviousRow() Function
  • The showLastRow() Function
  • The showFirstRow() Function
  • The addRow() function
  • The addRowToRecordset() Function

  • 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


    More Database Form Functions with HTML - The showPreviousRow() Function


    (Page 2 of 6 )

    The main role of this function is to show the previous row.


    function showPreviousRow()

    {

    //add to recordset any data that might have been included in the controls

    if (addMode == true)

    {

    addRowToRecordset();

    //after adding, you must go out of the addMode, so reset the addMode variable

    addMode = false;

    makeReadOnlyInputControls();

    //enable the buttons that were disabed in the add process

    enableButtons('E1','D1','F1','So1');

    }

    //edit any row of the recordset that might have been edited at the form

    if (editMode == true)

    {

    editRowToRecordset();

    //after adding, you must go out of the editMode, so reset the editMode variable

    editMode = false;

    makeReadOnlyInputControls();

    //enable the buttons, Edit, Delete, Clear, Find, Sort.

    enableButtons('E1','D1','C1','F1','So1');

    }


    if (index > 0)

    {

    index-=1; //the previous index

    for (j=0;j<6;j++)

    {

    //form the input text control ID

    CID = "EI" + j;

    //form the recordset ID

    RID = "TD" + index + j;

     

    document.getElementById(CID).value = document.getElementById(RID).innerHTML;

    }

    }


    //show the data row number

    document.getElementById('RowPosition').value = index + 1;

     

    //disable the showFirstRow and showPreviousRow Buttons if index is 0

    if (index == 0)

    {

    disableButtons('SFA1','SP1');

    }

    //enable the showNextRow and showLastRow Buttons if they were disabled

    if (index < numberOfRows)

    {

    enableButtons('SN1','SL1');

    }

    }

    More HTML Articles
    More By Chrysanthus Forcha


     

    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 4 hosted by Hostway
    Stay green...Green IT