JavaScript
  Home arrow JavaScript arrow Handling Remote Files with JavaScript Clic...
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

Handling Remote Files with JavaScript Click Interceptions
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-11-26

    Table of Contents:
  • Handling Remote Files with JavaScript Click Interceptions
  • Showing the contents of several text files in different windows
  • Loading the contents of several text files without web page reloads
  • The full source code of the text file reading application

  • 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


    Handling Remote Files with JavaScript Click Interceptions


    (Page 1 of 4 )

    If you’re a web developer who frequently builds JavaScript applications, then you may have already used click interceptions, even without being aware of their numerous advantages. This four-part series, of which this is the final part, shows you how to get the most out of them.

    Introduction

    Put in a simple way, click interceptions are a client-side mechanism for modifying (and eventually extending) the behavior of any “clickable” element of a web page to improve its existing functionality. In most cases, this process is performed by means of a simple “onclick” JavaScript event handler, which will fire up one or more functions associated to the element in question, in this way interrupting its normal behavior.

    To demonstrate how useful click interceptions can actually be, in each preceding article of the series, I created different hands-on examples aimed at showing how to implement this handy click interception approach with real-world web applications. I covered the construction of a simple image gallery, the submission and validation of a simple web form with Ajax, and so forth.

    Nonetheless, the inherent flexibility of click interceptions permits us to use them in many other cases with relative ease. Keeping this versatility in mind, in this last installment of the series I’m going to teach you how to utilize them to display the contents of several text files on the same web page.

    Basically, my plan is as follows: first, I’ll create a basic web document containing a group of links, where each of them will load a sample text file. Then, via the click interception approach, I’ll modify the default behavior of these links to make the contents of the text files be displayed on the same web page, in this case using Ajax.

    The example that I'm about to show you is indeed an appropriate end to this article series on using click interceptions with JavaScript. Thus, don’t waste more time in preliminaries; start reading this last tutorial. Let’s get going!

    More JavaScript Articles
    More By Alejandro Gervasio


       · In this last chapter of the series, click interceptions are used to modify the...
     

    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