Home arrow JavaScript arrow Handling Remote Files with JavaScript Click Interceptions
JAVASCRIPT

Handling Remote Files with JavaScript Click Interceptions


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.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
November 26, 2008
TABLE OF CONTENTS:
  1. · Handling Remote Files with JavaScript Click Interceptions
  2. · Showing the contents of several text files in different windows
  3. · Loading the contents of several text files without web page reloads
  4. · The full source code of the text file reading application

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Handling Remote Files with JavaScript Click Interceptions
(Page 1 of 4 )

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!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks
- Dynamic jQuery Styling

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials