Home arrow JavaScript arrow Exception Handling in JavaScript: Addressing Browser Incompatibilities

Exception Handling in JavaScript: Addressing Browser Incompatibilities

Not all browsers handle all code the same way. Differences can be addressed with JavaScript exceptions. These may not be the best way under all circumstances, but you'll find it worthwhile to examine this approach.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 11
October 11, 2005
  1. · Exception Handling in JavaScript: Addressing Browser Incompatibilities
  2. · JavaScript-based http requests: implementing cross-browser object instantiation
  3. · Cross-browser object instantiation: browser detection through exceptions
  4. · Proprietary event handlers: implementing browser-independent event handling
  5. · Assigning events to objects: using exceptions to manipulate event handlers

print this article

Exception Handling in JavaScript: Addressing Browser Incompatibilities
(Page 1 of 5 )


Welcome to the last part of the series ďException Handling in JavaScript.Ē As you might guess, Iím winding up this tutorial focused on exploring the huge terrain of JavaScript exceptions, by running through numerous examples about their application in real client programs. Indeed, the topic is by far more extensive than can be treated in a few articles, thus complete coverage is nearly impossible. However, Iíve explained in a friendly way the basics of exceptions, by introducing their core concepts as well as their direct implementation in concrete cases.

With reference to a practical application, in my previous article I offered an introduction to using custom error objects in a classic situation -- client-side form validation -- by tackling the issue from a different point of view, certainly distinct from traditional form verification techniques. Whether you use JavaScript as part of overall data validation processes (remember that server-side checking is a must), or simply for adding pre-defined behaviors to the structure of web documents, exceptions can be used to handle errors in a more professional way, by utilizing popular ďtry-catchĒ blocks.

Since most of the examples that Iíve shown through this series are aimed at providing you with the required background to use exceptions in practical cases, over this last part Iíll continue sticking to that approach by demonstrating particularly how some browser incompatibilities can be addressed with exceptions. Of course, Iím not claiming this method is the best way to deal with all browser inconsistencies, but certainly it does offer an alternative method thatís worth reviewing.

Now that you know what this last part of the series is about, letís see a few examples that use exceptions for solving some browser-related incompatibilities.

blog comments powered by Disqus

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


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