Java
  Home arrow Java arrow Building a Pagination System with AJAX
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  
Download TestComplete 
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? 
JAVA

Building a Pagination System with AJAX
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 68
    2006-06-05

    Table of Contents:
  • Building a Pagination System with AJAX
  • Building the dynamic scroll bar
  • Defining the scrolling system’s CSS declarations
  • Defining the (X)HTML markup and JavaScript functions

  • 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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Building a Pagination System with AJAX
    (Page 1 of 4 )

    You know how to use AJAX to pull rows from a database, but do you know how to create an AJAX-based system to organize the records neatly into pages? You'll know how to do that by the end of this series! This first article shows you how to build the user interface.

    Introduction

    If you’re an enthusiast Web developer who has been working with AJAX for a while, then you probably think of it as a remarkable combination of programmatic methods for making HTTP requests in the background, with no page reloads. The longer you think about the methods in the abstract, apart from the possible implementations for this requesting mechanism, the more ideas you’ll get for developing potential applications.

    Quite possibly, you’ve already used AJAX in several areas of Web development, in order to create auto completion systems, highly responsive chatters, or different desktop-like applications that use silent requests as the driving force for performing specific tasks. Does all this stuff sound familiar to you? I hope so.

    Also, it should be noticed that most of these applications use a database as the backend for storing dynamic and static content, and eventually there will be a moment when a bunch of records will need to be pulled directly from one or many tables. So, after all this largesse, the question that comes up now is: is it possible to create an AJAX-based mechanism that not only fetches some rows from a database, but is also capable of paginating them? Well, since the first thing you did (at least here) was read the title of this article, the answer is a loud Yes!

    However, let me first put things in the right context: when I talk about an AJAX-driven pagination system, certainly I’m not talking about building the popular page links used for many pages of records. Instead, what I plan to construct here is an application that will use a simple scrollbar as the controlling element for displaying chunks of database records, in accordance with its physical position within a (X)HTML containing structure.

    According to the programming logic that I just described, the pagination system (in fact, I’d rather call it a dynamic scrolling system) will display a predefined number of records, which will be fetched dynamically from a database table, either when scrolling up or down inside the containing area, without the need to include page links.

    Indeed, the idea sounds interesting, therefore let’s start building the user interface of this AJAX-based scrolling system. Let’s go!

    More Java Articles
    More By Alejandro Gervasio


       · If you're one of those developers wanting to use AJAX in creative ways, then this...
       · One thing that would make this even better is to size the drag handle based upon the...
       · Thank you for commenting on this article. Yeap, definitively, the improvement you...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...

    Iron Speed

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     





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