JavaScript
  Home arrow JavaScript arrow Using JavaScript Click Interceptions in an...
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

Using JavaScript Click Interceptions in an Image Gallery
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2008-11-12

    Table of Contents:
  • Using JavaScript Click Interceptions in an Image Gallery
  • Building the basic structure of an image gallery
  • Using click interception to modify existing behavior
  • Listing the full source code of the improved image gallery

  • 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


    Using JavaScript Click Interceptions in an Image Gallery


    (Page 1 of 4 )

    If you’re a web developer with an intermediate level of experience building JavaScript applications, then you may have already used click interceptions in one form or another. Basically, as its name would suggest, this client-side method consists of “catching” a mouse click that occurs on a selected element of a web page to modify its default behavior. In this second part of a four-part series, you'll learn how to use click interceptions in an image gallery.

    Introduction

    In most cases, the reason for intercepting clicks is simply to extend, by way of  JavaScript, the existing functionality of a certain server-side web application. Logically, however, click interceptions can be used in many other cases too.

    I imagine that you may wan to learn how to apply this handy JavaScript-based approach in real-world situations, such as submitting web forms via Ajax, building dynamic image galleries, or creating detail web pages for a database-driven web site.

    Naturally, if all of these examples sound interesting to you, then continue reading this article series. In the different tutorials that comprise it, you'll learn the basic concepts that surround the implementation of click interceptions with JavaScript, and how to apply them to expand the existing functionality of certain web applications, such as the ones mentioned above.

    In case you haven't yet read the preceding article of this series, let me tell you that in it, I demonstrated how to implement the aforementioned click interception approach to submit and validate a simple web form with Ajax. Essentially, this process was performed by "intercepting" via JavaScript each mouse click that occurs when the form in question is submitted, in this way making it possible to handle the pertinent form submission by mean of an XML HTTP Request Object instead of using the form's default behavior. That's not too hard to understand, right?

    Click interceptions can be used in many other cases, not only to submit web forms with Ajax. Taking into account the intrinsic versatility offered by this method, in this second part of the series I'm going to teach you how to use it to extend the behavior of a basic image gallery.

    Sounds pretty interesting, doesn't it? Thus, come with me and learn how to improve the functionality of the an image gallery by using click interceptions. Let's get started!

    More JavaScript Articles
    More By Alejandro Gervasio


       · In this second chapter of the series, clicks interceptions are applied to extend...
     

    JAVASCRIPT ARTICLES

    - 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
    - Active Client Pages at the Server
    - ACP Tab Web Page







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