Java
  Home arrow Java arrow Page 3 - 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  
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? 
JAVA

Building a Pagination System with AJAX
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 100
    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
     
     
    ADVERTISEMENT


    Building a Pagination System with AJAX - Defining the scrolling system’s CSS declarations


    (Page 3 of 4 )

    A logical place to start building the presentational layer of this AJAX-driven scrolling system is with precisely defining the CSS rules that will provide the look and feel of each (X)HTML element. That said, here is the set of styling rules that I plan to integrate with the program. Please have a look:

    <style type="text/css">

    .handle{
        width: 16px;
        height: 118px;
        position: absolute;
        background: url('handle.gif') center center no-repeat;
        margin: 0;
        padding: 0;
        cursor: default;
        z-index: 2;
    }

    #scrollbar{
        width: 18px;
        height: 500px;
        position: absolute;
        top: 50px;
        left: 700px;
        background: url('scrollbar.gif') center center no-repeat;
        margin: 0;
        padding: 0;
        z-index: 1;
    }

    #datacontainer{
        width: 500px;
        height: 498px;
        position: absolute;
        top: 50px;
        left: 198px;
        background: #fc6;
        border: 1px solid #ccc;
        margin: 0;
        padding: 5;
    }

    p{
        font: normal 12px Verdana, Arial;
        color: #000;
        padding: 5px;
        border: 1px solid #000;
        background: #F7F8CB;
    }

    </style>

    As you can see, the above CSS rules clearly show how the dynamic scrollbar will be created, as well as how the containing DIV, responsible for displaying the chunks of database records, will be included in the respective web document.

    I think that the most important things to note here are the “handle” class and the “scrollbar” selector. In each case, I defined the corresponding background image for the elements. When displayed together, these images will simulate the appearance of a real scrollbar.

    The rest of the CSS rules are used for styling the containing DIV that I mentioned before, which during a highly inspirational moment I called “datacontainer,” as well as for spicing up all the paragraphs inside the web page.

    Obviously, as you’ll know, all this isn’t rocket science at all, therefore let’s jump straight into the next section of this tutorial, so you can see how the (X)HTML markup and the skeleton of the JavaScript functions that I plan to use are properly defined.

    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...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT