Home arrow JavaScript arrow Parsing AJAX Responses with JavaScript and the innerHTML Property
JAVASCRIPT

Parsing AJAX Responses with JavaScript and the innerHTML Property


If you work with AJAX and have ever wondered which approach is best to use when parsing the responses triggered by a web server after performing an HTTP request, this article series is for you. Composed of three parts, it will lay out your options and the most efficient approaches. This article, the first part of the series, focuses on the "responseText" property and the "innerHTML" property.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 15
October 30, 2007
TABLE OF CONTENTS:
  1. · Parsing AJAX Responses with JavaScript and the innerHTML Property
  2. · Working with HTTP XML Request objects
  3. · Parsing web server responses
  4. · The full source code of the sample AJAX application

print this article
SEARCH DEVARTICLES

Parsing AJAX Responses with JavaScript and the innerHTML Property
(Page 1 of 4 )

If you're a web developer who has already tasted the power of AJAX, then you're familiar with the buzzwords associated with this technology and the correct utilization of all of its methods and properties. Indeed, developing AJAX-driven web applications on a frequent basis will give you a strong sense of confidence in mastering the pillars of this web development area, such as working with HTTP requester objects, handling synchronous and asynchronous HTTP requests, and logically processing the range of responses sent by a web server and triggered by a JavaScript application.

However, while acquiring a decent background in how to work with AJAX is actually a no-brainer process that can be tackled with minor hassles, the truth is that eventually you may have some gaps on this topic that naturally must be properly filled in. But what do I really mean by filling in some gaps? Well, if you found yourself scratching your head trying to figure out what AJAX property is better to use to parse a specific web server response, then you may need to take a look at some approaches to how to achieve this as painlessly as possible.

AJAX offers only two primary properties to parse all of the HTTP responses sent by a web server; these are the "responseText" and "responseXML." Even so, there are certain situations during the development of an AJAX application that can be quite challenging to tackle, particularly if you have serious doubts about how to process the outputs of JavaScript-based HTTP requests.

Therefore, in this three-part series of articles, I'll be showing you by means of numerous code samples, different approaches that you may want to use to parse all of the responses triggered by a web server after performing an AJAX HTTP request. These tutorials will cover both text and XML-based responses, in this way providing you with a friendly guide on how to process AJAX requests with minor hassles.

Speaking more specifically, the first installment of the series will walk you through  working with the popular "responseText" property, so get ready to sharpen your existing skills for processing text-based responses with AJAX. Let's begin this educational journey now!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- 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 
Support 

Developer Shed Affiliates

 




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