HTML
  Home arrow HTML arrow Page 4 - Building the Recordset for an HTML Databas...
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 
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

Building the Recordset for an HTML Database Form
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-09-24

    Table of Contents:
  • Building the Recordset for an HTML Database Form
  • The Other Records
  • Code
  • Maximum Number of Records a Web Page Can Have

  • 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


    Building the Recordset for an HTML Database Form - Maximum Number of Records a Web Page Can Have


    (Page 4 of 4 )

    From my experience, the latest popular browsers can handle at least 1000 records (TR elements). These are more than enough records for a user to go through on a shopping web page. You should avoid having more than 100 records (or even 50) for a shopping page. If you want more than that, then I will show you how to do it in a way that will not be boring to the user, in a later series.

    Who Should Use This Web Page?

    The ordinary Internet user or the database administrator can use the web page.

    You should send the web page to the ordinary Internet user without the buttons to add, edit, save etc. The only buttons you can send with his web page are the Sort and Done buttons. Of course he should have the "Add to Cart" button for each record and some means to send the information in his shopping cart to the server. 

    Now you may think that the user can manipulate the form internally and send information that he has bought a higher-priced watch for a lower price. This must not be permitted, and you should take steps to make certain that it is not possible. You should arrange things such that each record has an ID, and the main information sent by the user should be the ID and number of a particular watch purchased. At the server you have a copy of all the data for a particular ID.

    Everything that I am describing -- the steps that need to be taken -- applies to the database administrator.

    Shopping Cart

    I have not written any code for the shopping cart, but I have indicated where you can have it. Concerning the shopping cart, the whole setup I have created has an advantage over other web pages with shopping carts. With other web pages you may have to scroll up and down to see your shopping cart or your shopping cart may be opened in another window. Here your shopping cart appears next to what you are buying. This is because you scroll through the form to buy and not through the page.

    The Form's enctype Attribute

    The HTML Form element has an attribute called enctype. This attribute indicates the kind of data in your form. The default value for this attribute is "application/x-www-form-urlencoded." This works only when you are dealing with text data. If this is what you want, you can omit the attribute from your Form element. When you have File Input Controls (links to images) you should not omit this attribute. Its value has to be "multipart/form-data."

    The Look of the Web Page

    You can modify your web page in many different ways; feel free to use the techniques with which you are familiar. I have given you the essentials. You can reduce the size of the records and hence the size of the tabular form, but do not reduce them too much.

    Coding

    I think I talked a lot about coding in the previous parts of this series. I will say very little here.

    Note that the controls in the recordset are controls that can be transmitted automatically by the actual form. So the code that copies the recordset information to the transmitted table can copy only the controls. The controls have been given IDs to facilitate this.

    The code that does the sorting should compare the text of the controls and not the controls themselves.

    Downloading Time

    Since the web page has a large amount of text, images and JavaScript code, you are probably asking yourself if the download time will be too long. Remember, at the beginning of this article, I said that we are dealing with a small database. If your database is small, everything will be fine. For large databases, I will write another series where I will show you how to make a long download time appear small to the user.

    We shall carry on in the next part of the series where we shall see how to maximize and restore the images.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · You gotta start indenting your code...i mean come on. That stuff is completely...
     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek