Home arrow HTML arrow Page 2 - Tabular Database Form Functions with HTML
HTML

Tabular Database Form Functions with HTML


Welcome to the ninth part of a thirteen-part series on HTML database forms. In the previous part we began our discussion of Tabular forms, having dealt with Single-Row forms up until that point. In this part we continue our discussion of what functions to use with Tabular forms and how they are different from their Single-Row counterparts.

Author Info:
By: Chrysanthus Forcha
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
September 10, 2008
TABLE OF CONTENTS:
  1. · Tabular Database Form Functions with HTML
  2. · The editRow() Function
  3. · The includeInTransmittedTable()
  4. · The deleteRow() Function
  5. · The swap() and quickSort() Function

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Tabular Database Form Functions with HTML - The editRow() Function
(Page 2 of 5 )

This function is different from the one for the Single-Row Form, just as the  addRow() function here is different from that of the corresponding one in the Single-Row Form, and for similar reasons. When you click the Edit button, it is the active (selected) row that will be edited. The editRow() function begins by checking to see if there is an active row (selected row). For our tabular form, when the web page opens the index variable is set to null. The editRow() function checks to see if the index is null. If it is, it means that no row has been selected.

It then alerts the user that he must select the row he wants to edit and returns after the user clicks the OK button of the alert box. If a row has been selected, the function sets the editMode variable to "true" and then disables all the buttons. It makes the selected row writable by calling the makeWriteInputControls() function which now receives the index as an argument. Finally it displays the conspicuous button, which has the text "After Editing or Adding, You must Click here." The function is:


function editRow()

{

//you must select a row before you can edit, this means the index variable must hold an integer

if (index == null)

{

alert('You must select the row to edit.');

return;

}

 

editMode = true;


//disable the all buttons

disableButtons('A1','E1','D1','C1','So1','S1','Do1');


//make input controls write-able

makeWriteInputControls(index);

 

//display the button to send the added row to the transmitted table

document.getElementById('TDAE1').style.display = "block";

}


The editRowToRecordset() function is removed for the same reasons that the addRowToRecordset() function was removed.




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