JavaScript
  Home arrow JavaScript arrow Creating Table Rulers
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? 
JAVASCRIPT

Creating Table Rulers
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-08-27

    Table of Contents:
  • Creating Table Rulers
  • Creating a table ruler: building a sample HTML table
  • Highlighting table rows with CSS and JavaScript
  • The table ruler's full source code

  • 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


    Creating Table Rulers


    (Page 1 of 4 )

    Welcome to the first part of a multi-part series on building a table ruler for your HTML tables. In this part, you'll learn what a table ruler is, why you might want one for your tables, and how to construct a simple one with CSS and JavaScript.

    In the last few years, HTML tables have acquired a bad name when it comes to building the layout of web pages. Many web designers consider them to be "evil things," while DIVs have gained remarkable popularity.

    I don't intend here to contribute my two cents to the DIVs vs. TABLES debate, since this isn't the goal of this group of articles. However, there's a fact that can't be denied: sooner or later, you'll be faced with the need to use tables when developing a particular web site. And as you know, they're great for displaying tabular data.

    Things can get complicated when it's necessary to build large tables that contain numerous rows. Suppose for a moment that your web site displays a catalog of different products, where each of these are shown using lengthy HTML tables. In this situation, it's possible that users start reading the heading items of your tables, and then at the halfway mark, simply get lost!

    One of the most useful and simple approaches to avoid a problem like this consists of building a table ruler. This is a visual aid that highlights the table row that a user is currently reading. As with many other things relating to web development, there are several methods that can be employed to create a table ruler, ranging from CSS-based solutions to a combination of CSS and JavaScript.

    Therefore, in this series of articles I'll be explaining how to build several table rulers by using different approaches. In this first article I'm going to start up showing you an introductory approach, based mostly on CSS and a pinch of JavaScript, and then, with this technique well underway, I'll be teaching you a few others that will rely completely on unobtrusive JavaScript.

    Now, it's time to get rid of the preliminaries and begin learning how to create distinct table rulers in a few easy steps. Let's get started!

    More JavaScript Articles
    More By Alejandro Gervasio


       · This series of articles explains how to build HTML table rulers by using different...
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







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